mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 21:43:18 +00:00
Add summary of skipped tests
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require_once __DIR__ . "/../../lib/classes/bootstrap.class.php";
|
require_once __DIR__ . "/../../lib/classes/bootstrap.class.php";
|
||||||
|
require_once __DIR__ . "/PhraseanetPHPUnitListener.class.inc";
|
||||||
|
|
||||||
use Silex\WebTestCase;
|
use Silex\WebTestCase;
|
||||||
use Symfony\Component\HttpKernel\Client;
|
use Symfony\Component\HttpKernel\Client;
|
||||||
@@ -1313,6 +1314,20 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase
|
|||||||
*/
|
*/
|
||||||
private static function deleteRessources()
|
private static function deleteRessources()
|
||||||
{
|
{
|
||||||
|
$skipped = \PhraseanetPHPUnitListener::getSkipped();
|
||||||
|
|
||||||
|
if($skipped)
|
||||||
|
{
|
||||||
|
echo "\nSkipped test : \n\n";
|
||||||
|
foreach($skipped as $skipped_test)
|
||||||
|
{
|
||||||
|
echo $skipped_test . "\n";
|
||||||
|
}
|
||||||
|
echo "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
\PhraseanetPHPUnitListener::resetSkipped();
|
||||||
|
|
||||||
if (self::$story_1 instanceof record_adapter)
|
if (self::$story_1 instanceof record_adapter)
|
||||||
{
|
{
|
||||||
self::$story_1->delete();
|
self::$story_1->delete();
|
||||||
@@ -1325,7 +1340,7 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase
|
|||||||
}
|
}
|
||||||
if (self::$record_1 instanceof record_adapter)
|
if (self::$record_1 instanceof record_adapter)
|
||||||
{
|
{
|
||||||
// self::$record_1->delete();
|
self::$record_1->delete();
|
||||||
self::$record_1 = null;
|
self::$record_1 = null;
|
||||||
}
|
}
|
||||||
if (self::$record_2 instanceof record_adapter)
|
if (self::$record_2 instanceof record_adapter)
|
||||||
|
@@ -1,8 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
class SimpleTestListener implements PHPUnit_Framework_TestListener
|
class PhraseanetPHPUnitListener implements PHPUnit_Framework_TestListener
|
||||||
{
|
{
|
||||||
|
|
||||||
|
private static $skipped = array();
|
||||||
|
|
||||||
public function addError(PHPUnit_Framework_Test $test, Exception $e, $time)
|
public function addError(PHPUnit_Framework_Test $test, Exception $e, $time)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@@ -20,6 +22,21 @@ class SimpleTestListener implements PHPUnit_Framework_TestListener
|
|||||||
|
|
||||||
public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time)
|
public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time)
|
||||||
{
|
{
|
||||||
|
echo "feed... ++ " . count(static::$skipped) . "\n";
|
||||||
|
static::$skipped[] = get_class($test) . ':' . $test->getName() . ' - ' . $e->getMessage();
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getSkipped()
|
||||||
|
{
|
||||||
|
return static::$skipped;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function resetSkipped()
|
||||||
|
{
|
||||||
|
static::$skipped = array();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue
Block a user