Files
php-uuid/tests/TestCase.php
T
2015-08-14 22:24:16 +02:00

47 lines
1.1 KiB
PHP

<?php
namespace Ramsey\Uuid;
class TestCase extends \PHPUnit_Framework_TestCase
{
protected function skip64BitTest()
{
if (PHP_INT_SIZE == 4) {
$this->markTestSkipped(
'Skipping test that can run only on a 64-bit build of PHP.'
);
}
}
protected function skipIfNoMoontoastMath()
{
if (!$this->hasMoontoastMath()) {
$this->markTestSkipped(
'Skipping test that requires moontoast/math.'
);
}
}
protected function hasMoontoastMath()
{
return class_exists('Moontoast\\Math\\BigNumber');
}
protected function skipIfLittleEndianHost()
{
if (FeatureSet::isLittleEndianSystem()) {
$this->markTestSkipped(
'Skipping test targeting big-endian architectures.'
);
}
}
protected function skipIfBigEndianHost()
{
if (! FeatureSet::isLittleEndianSystem()) {
$this->markTestSkipped(
'Skipping test targeting little-endian architectures.'
);
}
}
}