Skip to content

Commit

Permalink
add tests for Counter exceptions in phpunit 4.8 style
Browse files Browse the repository at this point in the history
  • Loading branch information
sokolnikov911 committed May 9, 2018
1 parent 38d384b commit 6c3d06c
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/sokolnikov911/YandexTurboPages/CounterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,26 @@ public function testCustomCounterAsXML()
';
$this->assertXmlStringEqualsXmlString($expect, $counter->asXML()->asXML());
}

/**
* @expectedException \UnexpectedValueException
*/
public function testCustomCounterException()
{
$counterType = Counter::TYPE_CUSTOM;
$counterId = null;
$counterUrl = null;
new Counter($counterType, $counterId, $counterUrl);
}

/**
* @expectedException \UnexpectedValueException
*/
public function testNonCustomCounterException()
{
$counterType = Counter::TYPE_YANDEX;
$counterId = null;
$counterUrl = null;
new Counter($counterType, $counterId, $counterUrl);
}
}

0 comments on commit 6c3d06c

Please sign in to comment.