Ejemplo n.º 1
0
 /**
  * @param TestSuiteFactory $factory
  * @param TestFilter $filter
  * @param string $cwd Working directory
  * @param string $path Directory of file relative to $cwd
  * @param null|TestName $parent
  */
 function __construct(TestSuiteFactory $factory, TestFilter $filter, $cwd, $path, TestName $parent = null)
 {
     parent::__construct($parent);
     $this->path = rtrim($cwd, '/\\') . DIRECTORY_SEPARATOR . trim($path, '/\\');
     $this->name = $path;
     $this->filter = $filter;
     $this->factory = $factory;
 }
Ejemplo n.º 2
0
 function composeSuite()
 {
     $this->givenTheConfiguration(['suite' => ['name' => 'One', 'suites' => [['class' => ComposeTestSuites_StaticFoo::class], ['name' => 'Two', 'suites' => [['name' => 'Three']]]]]]);
     $this->whenIExecuteTheCommand();
     $this->then->size($this->test->getTests(), 2);
     $this->then->isInstanceOf($this->test->getTests()[0], ComposeTestSuites_StaticFoo::class);
     $this->then->isInstanceOf($this->test->getTests()[1], GenericTestSuite::class);
     $this->then->equals($this->test->getTests()[1]->getName()->toString(), 'One::Two');
     $this->then->size(self::suite($this->test->getTests()[1])->getTests(), 1);
     $this->then->equals(self::suite($this->test->getTests()[1])->getTests()[0]->getName()->toString(), 'One::Two::Three');
 }
Ejemplo n.º 3
0
 /**
  * @return TestName
  */
 public function getName()
 {
     return parent::getName()->with($this->name);
 }
Ejemplo n.º 4
0
 /**
  * @param TestFilter $filter
  * @param string $suite
  * @param null|TestName $parent
  */
 function __construct(TestFilter $filter, $suite, TestName $parent = null)
 {
     parent::__construct($parent);
     $this->filter = $filter;
     $this->suite = $suite;
 }