import axiom without dependency on symfony console
Some checks failed
abc-api/abcParser/pipeline/head There was a failure building this commit
Some checks failed
abc-api/abcParser/pipeline/head There was a failure building this commit
This commit is contained in:
33
axiom_tests/Reports/SimpleReportTest.php
Normal file
33
axiom_tests/Reports/SimpleReportTest.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Enzyme\Axiom\Reports\SimpleReport;
|
||||
|
||||
class SimpleReportTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function test_report_stores_message_as_expected()
|
||||
{
|
||||
$expected = 'Something went wrong.';
|
||||
$report = new SimpleReport($expected);
|
||||
$this->assertEquals($expected, $report->getMessage());
|
||||
}
|
||||
|
||||
public function test_report_stores_details_as_expected()
|
||||
{
|
||||
$expected = ['tests' => 'required'];
|
||||
$report = new SimpleReport('Foo Bar went pear shaped.', $expected);
|
||||
$this->assertEquals($expected, $report->getDetails());
|
||||
}
|
||||
|
||||
public function test_report_reports_details_as_expected()
|
||||
{
|
||||
$expected = true;
|
||||
$report = new SimpleReport(
|
||||
'It went pear shaped again.', ['tests' => 'required']
|
||||
);
|
||||
$this->assertEquals($expected, $report->hasDetails());
|
||||
|
||||
$expected = false;
|
||||
$report = new SimpleReport('Foo Bar went pear shaped.');
|
||||
$this->assertEquals($expected, $report->hasDetails());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user