unit test bettering
This commit is contained in:
parent
3d05c2896a
commit
76c2815b2b
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
class ImageTest extends ShimmiePHPUnitTestCase {
|
class ImageIOTest extends ShimmiePHPUnitTestCase {
|
||||||
public function testUserStats() {
|
public function testUserStats() {
|
||||||
$this->log_in_as_user();
|
$this->log_in_as_user();
|
||||||
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "test");
|
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "test");
|
||||||
|
@ -22,7 +22,10 @@ abstract class ShimmiePHPUnitTestCase extends PHPUnit_Framework_TestCase {
|
|||||||
|
|
||||||
public function setUp() {
|
public function setUp() {
|
||||||
$class = str_replace("Test", "", get_class($this));
|
$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");
|
$this->markTestSkipped("$class not supported with this database");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user