Skip to content

Commit

Permalink
ErrorsTest - placeholder for tests against inline assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
sanmai committed May 30, 2017
1 parent 3e0d685 commit 160982d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
4 changes: 4 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
</whitelist>
</filter>

<php>
<ini name="assert.exception" value="1"/>
</php>

<logging>
<log type="coverage-clover" target="build/logs/clover.xml"/>
<log type="coverage-text" target="php://stdout"/>
Expand Down
21 changes: 21 additions & 0 deletions tests/Pipeline/ErrorsTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace Pipeline;

use PHPUnit\Framework\TestCase;

class ErrorsTest extends TestCase
{
protected function setUp()
{
if (ini_get('zend.assertions') != 1) {
$this->markTestSkipped("Requires internal assertions");
}
}

public function testAssertFalse()
{
$this->expectException(\AssertionError::class);
assert(false);
}
}

0 comments on commit 160982d

Please sign in to comment.