Esempio n. 1
0
 /**
  * @test
  */
 public function isSeleniumServerRunningWhenHostIsInvalidReturnsFalse()
 {
     // We will use 'example.invalid' as an invalid host
     // (according to RFC 2606 the TLD '.invalid' should be used to test for invalid hosts).
     $this->extensionSettingsService->set('selenium_host', 'http://example.invalid');
     self::assertFalse($this->subject->isSeleniumServerRunning());
 }
 /**
  * @test
  */
 public function setCanSetArrayValue()
 {
     $key = 'foo';
     $value = array('foo', 'foobar');
     $this->subject->set($key, $value);
     self::assertSame($value, $this->subject->getAsArray($key));
 }
Esempio n. 3
0
 /**
  * @test
  */
 public function createTestCaseSelectorMarksNoTestCaseSelectedTestCaseAsNotSelected()
 {
     $selectedExtension = 'phpunit';
     $this->userSettingsService->set('extSel', $selectedExtension);
     $this->request->set('testCaseFile', '');
     self::assertNotRegExp('#<option [^>]* selected="selected">Tx_Phpunit_Tests_Unit_BackEnd_ModuleTest</option>#', $this->subject->createTestCaseSelector($selectedExtension));
 }
 /**
  * @test
  */
 public function setCanSetArrayValue()
 {
     $key = 'foo';
     $value = array('foo', 'foobar');
     $this->fixture->set($key, $value);
     $this->assertSame($value, $this->fixture->getAsArray($key));
 }
Esempio n. 5
0
 /**
  * @test
  */
 public function runTestWhenServerIsNotRunningMarksTestAsSkipped()
 {
     $this->extensionSettingsService->set('selenium_host', 'http://example.invalid');
     $subject = new \Tx_Phpunit_Selenium_TestCase(null, array(), '', $this->extensionSettingsService);
     try {
         $subject->runTest();
     } catch (PHPUnit_Framework_SkippedTestError $e) {
         self::assertTrue(true);
     }
 }
 /**
  * @test
  */
 public function runTestWhenServerIsNotRunningMarksTestAsSkipped()
 {
     $this->extensionSettingsService->set('selenium_host', 'http://example.invalid');
     $fixture = new Tx_Phpunit_Selenium_TestCase();
     try {
         $fixture->runTest();
     } catch (PHPUnit_Framework_SkippedTestError $e) {
         $this->assertTrue(TRUE);
     }
 }
 /**
  * @test
  */
 public function getExcludedExtensionKeysForNoExcludedExtensionsReturnsEmptyArray()
 {
     $this->extensionSettingsService->set('excludeextensions', '');
     $this->assertSame(array(), $this->fixture->getExcludedExtensionKeys());
 }