diff --git a/tests/src/Unit/HarTest.php b/tests/src/Unit/HarTest.php index 9a9b9a76..e10d0507 100644 --- a/tests/src/Unit/HarTest.php +++ b/tests/src/Unit/HarTest.php @@ -59,6 +59,23 @@ public function testSplitLogEntries(): void } } + public function testSetLog(): void + { + $creator = new \Deviantintegral\Har\Creator(); + $creator->setName('TestCreator'); + $creator->setVersion('1.0'); + + $log = (new Log()) + ->setVersion('1.2') + ->setCreator($creator) + ->setEntries([]); + + $har = (new Har())->setLog($log); + + $this->assertSame($log, $har->getLog()); + $this->assertEquals('1.2', $har->getLog()->getVersion()); + } + public function testCloneBrowserIsDeep(): void { $repository = $this->getHarFileRepository(); diff --git a/tests/src/Unit/ReadmeTest.php b/tests/src/Unit/ReadmeTest.php index af1dc06f..216b9ed4 100644 --- a/tests/src/Unit/ReadmeTest.php +++ b/tests/src/Unit/ReadmeTest.php @@ -19,6 +19,10 @@ class ReadmeTest extends TestCase { public function testExample(): void { + if (!getenv('FUNCTIONAL_TESTS')) { + $this->markTestSkipped('Skipping functional test. Set FUNCTIONAL_TESTS=1 to run.'); + } + // Initialize a repository of HAR files, with IDs being the file names. $repository = new HarFileRepository(__DIR__.'/../../fixtures');