unit test bettering

This commit is contained in:
Shish 2016-06-17 23:41:57 +01:00
parent 3d05c2896a
commit 76c2815b2b
2 changed files with 5 additions and 2 deletions

View file

@ -1,5 +1,5 @@
<?php
class ImageTest extends ShimmiePHPUnitTestCase {
class ImageIOTest extends ShimmiePHPUnitTestCase {
public function testUserStats() {
$this->log_in_as_user();
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "test");

View file

@ -22,7 +22,10 @@ abstract class ShimmiePHPUnitTestCase extends PHPUnit_Framework_TestCase {
public function setUp() {
$class = str_replace("Test", "", get_class($this));
if(!method_exists($class, "is_live") || !ext_is_live($class)) {
if(!class_exists($class)) {
$this->markTestSkipped("$class not loaded");
}
elseif(!ext_is_live($class)) {
$this->markTestSkipped("$class not supported with this database");
}