Example #1
0
 /**
  * @param PHPUnit_Framework_Test $test
  * @return int|void
  */
 protected function getFlowId(PHPUnit_Framework_Test $test)
 {
     if ($test instanceof JobTestInterface) {
         return 'karzer-' . $test->getPoolPosition();
     } else {
         return 'phpunit-' . parent::getFlowId($test);
     }
 }
 public function testMethodNameForSelfDescribingTest()
 {
     $filename = __DIR__ . '/Fixtures/example.phpt';
     $test = new \PHPUnit_Extensions_PhptTestCase($filename);
     $this->listener->startTest($test);
     $expectedPrefix = "##teamcity[testStarted captureStandardOutput='true' name='{$filename}' timestamp='";
     $this->assertStringStartsWith($expectedPrefix, $this->readOut());
 }
    public function testMethodNameForSelfDescribingTest()
    {
        $filename = __DIR__ . '/Fixtures/example.phpt';
        $test = new \PHPUnit_Extensions_PhptTestCase($filename);
        $this->listener->startTest($test);
        $expectedOutput = <<<EOS
##teamcity[testStarted captureStandardOutput='true' name='{$filename}' timestamp='2015-05-28T16:14:12.17+0700' flowId='24107']

EOS;
        $this->assertOutputSame($expectedOutput);
    }