Пример #1
0
 public function testInputOutputPaths()
 {
     $builder = new \vc\App\Builder();
     $result = $builder->build($this->getCLIResult());
     $this->assertThat($result, $this->isInstanceOf('\\vc\\App\\Config'));
     $this->assertThat($result->getOutputDir(), $this->isInstanceOf('\\r8\\FileSys\\Dir'));
     $this->assertThat($result->getInputPaths(), $this->isInstanceOf('\\vc\\App\\Paths'));
     \r8\Test\Constraint\Iterator::assertCount(2, $result->getInputPaths());
 }
Пример #2
0
 public function testIteration()
 {
     $result = new \r8\Validator\ErrorList();
     \r8\Test\Constraint\Iterator::assertCount(0, $result);
     $result->addError("Test Error");
     \r8\Test\Constraint\Iterator::assert(array("Test Error"), $result);
     $result->addError("Error Two");
     \r8\Test\Constraint\Iterator::assert(array("Test Error", "Error Two"), $result);
 }