-
Notifications
You must be signed in to change notification settings - Fork 2
3. Examples
Siad Ardroumli edited this page May 28, 2015
·
4 revisions
//...
try {
assumeThat(true, is(false));
} catch (\MehrAlsNix\Assumptions\AssumptionViolatedException $ave) {
echo $ave->getMessage();
}
Inside setUpBeforeClass:
<?php
namespace MehrAlsNix\Example\Tests;
use PHPUnit_Framework_TestCase as TestCase;
class ImplementationTest extends TestCase
{
public static function setUpBeforeClass()
{
assumePhpVersion('5.6');
}
// ...
}
Or even inside a custom @beforeClass annotated method:
// ...
/**
* @beforeClass
*/
public static function setUpSomethingOther()
{
assumePhpVersion('5.6');
}
// ...
Assume that at least php 5.6 is given, before any test methods in a test class are run.