コード例 #1
0
 public function testLifecycle()
 {
     $storage = new TestCaseStorage();
     $testCase = $storage->get();
     $this->assertEmpty($testCase->getName());
     $name1 = 'test-name1';
     $testCase->setName($name1);
     $this->assertEquals($name1, $storage->get()->getName());
     $name2 = 'test-name1';
     $testCase = new TestCase();
     $testCase->setName($name2);
     $storage->put($testCase);
     $this->assertEquals($name2, $storage->get()->getName());
     $storage->clear();
     $this->assertEmpty($storage->get()->getName());
 }
コード例 #2
0
 /**
  * @param \Yandex\Allure\Adapter\Model\TestCase $testCase
  */
 public function addTestCase(TestCase $testCase)
 {
     $this->testCases[$testCase->getName()] = $testCase;
 }