コード例 #1
0
 /**
  * @test
  */
 public function shouldCreateAnArrayOfTestSuitesFromXML()
 {
     $output = CreateTestsQueueFromPhpUnitXML::execute(__DIR__ . '/Fixture/phpunit.xml.dist');
     $directory = __DIR__ . '/Infrastructure/';
     $files = array('InMemoryQueueFactoryTest.php', 'InMemoryQueueTest.php');
     $queue = new TestsQueue();
     foreach ($files as $file) {
         $queue->add($directory . $file);
     }
     $this->assertEquals($queue, $output);
 }
コード例 #2
0
 public function execute($xmlFile = null, $preserveOrder = false)
 {
     if (null !== $xmlFile) {
         $testsQueue = CreateTestsQueueFromPhpUnitXML::execute($xmlFile);
     } else {
         $readFromPipe = new CreateTestsQueueFromSTDIN();
         $testsQueue = $readFromPipe->execute();
     }
     $this->assertTestsQueueIsNotEmpty($testsQueue);
     if (!$preserveOrder) {
         $testsQueue = $testsQueue->randomize();
     }
     $queue = $this->queueFactory->create();
     $queue->push($testsQueue);
     return $queue;
 }
コード例 #3
0
 /**
  * @test
  */
 public function shouldCreateAnArrayOfTestSuitesFromXML()
 {
     $output = CreateTestsQueueFromPhpUnitXML::execute(__DIR__ . '/Fixture/phpunit.xml.dist');
     $this->assertEquals(new TestsQueue(array('tests/Fastest/folderA', 'tests/Fastest/folderB')), $output);
 }