Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions tests/src/Unit/HarTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 4 additions & 0 deletions tests/src/Unit/ReadmeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down