コード例 #1
0
 /**
  * @test
  */
 public function setIconPathSetsIconPath()
 {
     $this->fixture->setIconPath('someIcon.gif');
     $this->assertSame('someIcon.gif', $this->fixture->getIconPath());
 }
コード例 #2
0
 /**
  * @test
  */
 public function renderCreatesIconPathWithHtmlSpecialChars()
 {
     $extensionKey = 'phpunit';
     $testable = new Tx_Phpunit_Testable();
     $testable->setKey($extensionKey);
     $testable->setIconPath(ExtensionManagementUtility::extPath('phpunit') . 'ext_&_icon.gif');
     $subject = new Tx_Phpunit_ViewHelpers_ExtensionSelectorViewHelper();
     $subject->injectOutputService($this->outputService);
     $subject->injectUserSettingService($this->userSettingsService);
     /** @var $testFinder Tx_Phpunit_Service_TestFinder|PHPUnit_Framework_MockObject_MockObject */
     $testFinder = $this->getMock('Tx_Phpunit_Service_TestFinder', array('getTestablesForEverything'));
     $testFinder->expects(self::any())->method('getTestablesForEverything')->will(self::returnValue(array($extensionKey => $testable)));
     $subject->injectTestFinder($testFinder);
     $subject->render();
     self::assertContains(htmlspecialchars($testable->getIconPath()), $this->outputService->getCollectedOutput());
 }
コード例 #3
0
ファイル: TestableTest.php プロジェクト: jacobsenj/phpunit
 /**
  * @test
  */
 public function setIconPathSetsIconPath()
 {
     $this->subject->setIconPath('someIcon.gif');
     self::assertSame('someIcon.gif', $this->subject->getIconPath());
 }