update tests to work with phpunit version installed by composer
This commit is contained in:
parent
8ae0123635
commit
9b3f6f557a
|
@ -16,7 +16,8 @@
|
||||||
<whitelist>
|
<whitelist>
|
||||||
<directory>./include/</directory>
|
<directory>./include/</directory>
|
||||||
<directory>./public/</directory>
|
<directory>./public/</directory>
|
||||||
</whitelist>
|
<directory>./src/</directory>
|
||||||
|
</whitelist>
|
||||||
</filter>
|
</filter>
|
||||||
<php>
|
<php>
|
||||||
<const name="PHPUNIT_TESTSUITE" value="true"/>
|
<const name="PHPUNIT_TESTSUITE" value="true"/>
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Engelsystem\Test;
|
namespace Engelsystem\Test;
|
||||||
|
|
||||||
class LogEntriesModelTest extends \PHPUnit_Framework_TestCase
|
use \PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
|
class LogEntriesModelTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
public function create_LogEntry()
|
public function create_LogEntry()
|
||||||
{
|
{
|
||||||
LogEntry_create('test', 'test');
|
LogEntry_create('test', 'test');
|
||||||
|
@ -13,7 +15,7 @@ class LogEntriesModelTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
$count = count(LogEntries());
|
$count = count(LogEntries());
|
||||||
$this->assertNotFalse(LogEntry_create('test', 'test_LogEntry_create'));
|
$this->assertNotFalse(LogEntry_create('test', 'test_LogEntry_create'));
|
||||||
|
|
||||||
// There should be one more log entry now
|
// There should be one more log entry now
|
||||||
$this->assertEquals(count(LogEntries()), $count + 1);
|
$this->assertEquals(count(LogEntries()), $count + 1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Engelsystem\Test;
|
namespace Engelsystem\Test;
|
||||||
|
|
||||||
class RoomModelTest extends \PHPUnit_Framework_TestCase
|
use \PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
|
class RoomModelTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
private $room_id = null;
|
private $room_id = null;
|
||||||
|
|
||||||
public function create_Room()
|
public function create_Room()
|
||||||
|
@ -14,14 +16,14 @@ class RoomModelTest extends \PHPUnit_Framework_TestCase
|
||||||
public function test_Room()
|
public function test_Room()
|
||||||
{
|
{
|
||||||
$this->create_Room();
|
$this->create_Room();
|
||||||
|
|
||||||
$room = Room($this->room_id);
|
$room = Room($this->room_id);
|
||||||
|
|
||||||
$this->assertNotFalse($room);
|
$this->assertNotFalse($room);
|
||||||
$this->assertNotNull($room);
|
$this->assertNotNull($room);
|
||||||
$this->assertEquals($room['Name'], 'test');
|
$this->assertEquals($room['Name'], 'test');
|
||||||
|
|
||||||
$this->assertNull(Room(-1));
|
$this->assertNull(Room(- 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue