/** * reads and parses an ini string and writes the results into the cache * * @param string $iniString */ public function convertString($iniString) { $converter = new Converter($this->getLogger(), $this->getCache()); $converter->convertString($iniString); }
/** * */ public function testConvertStringWithoutPatternFaound() { $file = $this->getMock('\\BrowscapPHP\\Helper\\Filesystem', array('exists'), array(), '', false); $file->expects(self::never())->method('exists')->will(self::returnValue(false)); $this->object->setFilesystem($file); $content = ';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Browscap Version [GJK_Browscap_Version] Version=5031 Released=Mon, 30 Jun 2014 17:55:58 +0200 Format=ASP Type= ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; DefaultProperties [DefaultProperties] Comment=DefaultProperties Browser=DefaultProperties Version=0.0 MajorVer=0 MinorVer=0 Platform=unknown Platform_Version=unknown Alpha=false Beta=false Win16=false Win32=false Win64=false Frames=false IFrames=false Tables=false Cookies=false BackgroundSounds=false JavaScript=false VBScript=false JavaApplets=false ActiveXControls=false isMobileDevice=false isTablet=false isSyndicationReader=false Crawler=false CssVersion=0 AolVersion=0 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Ask [Ask] Parent=DefaultProperties Comment=Ask Browser=Ask Frames=1 IFrames=1 Tables=1 Crawler=1 Version=0.0 MajorVer=0 MinorVer=0 Platform=unknown Platform_Version=unknown Alpha= Beta= Win16= Win32= Win64= Cookies= BackgroundSounds= JavaScript= VBScript= JavaApplets= ActiveXControls= isMobileDevice= isTablet= isSyndicationReader= CssVersion=0 AolVersion=0 '; self::assertNull($this->object->convertString($content)); }