Updated integration to Travis-CI
Signed-off-by: Gregory PLANCHAT <g.planchat@gmail.com>
This commit is contained in:
parent
7a55d6e026
commit
a8dff3d6d7
40 changed files with 139 additions and 100 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
|
@ -1,3 +0,0 @@
|
|||
[submodule "vendor/ZendFramework"]
|
||||
path = vendor/ZendFramework
|
||||
url = git://github.com/zendframework/zf2.git
|
||||
6
.travis.yml
Normal file
6
.travis.yml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
language: php
|
||||
|
||||
php:
|
||||
- 5.4
|
||||
|
||||
script: build/build.sh
|
||||
10
build/build.sh
Normal file
10
build/build.sh
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
echo " * Wootook unit testing"
|
||||
|
||||
MODULES_DIR="`pwd`/../src/application/modules"
|
||||
|
||||
for file in "$MODULES_DIR/*"
|
||||
do
|
||||
echo " * Running ${file} module tests"
|
||||
phpunit --strict --configuration $MODULES_DIR/${file}/test/$phpunit.xml $MODULES_DIR/${file}
|
||||
done
|
||||
|
||||
|
|
@ -108,13 +108,13 @@ class MethodDefinition
|
|||
if (is_object($argumentVariable)) {
|
||||
$this->_arguments[$argumentPosition] = $argumentVariable;
|
||||
} else {
|
||||
$this->_arguments[$argumentPosition] = &$argumentVariable;
|
||||
$this->_arguments[$argumentPosition] =& $argumentVariable;
|
||||
}
|
||||
} else if (is_string($argumentPosition) && isset($this->_argumentIndex[$argumentPosition])) {
|
||||
if (is_object($argumentVariable)) {
|
||||
$this->_arguments[$this->_argumentIndex[$argumentPosition]] = $argumentVariable;
|
||||
} else {
|
||||
$this->_arguments[$this->_argumentIndex[$argumentPosition]] = &$argumentVariable;
|
||||
$this->_arguments[$this->_argumentIndex[$argumentPosition]] =& $argumentVariable;
|
||||
}
|
||||
} else {
|
||||
throw new CoreException\DependencyInjection\InvalidArgumentException('No such argument');
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
<?php
|
||||
|
||||
//require_once 'Wootook/Core/App/App.php';
|
||||
namespace WootookUnit\Core\App;
|
||||
|
||||
/**
|
||||
* Test class for Wootook\Core\App.
|
||||
* Generated by PHPUnit on 2011-09-01 at 11:24:52.
|
||||
*/
|
||||
class WootookTest_Core_App_AppTest extends PHPUnit_Framework_TestCase
|
||||
class AppTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
protected function _getObjectMock($constructorArgs, $methods = array())
|
||||
{
|
||||
|
|
@ -1,17 +1,18 @@
|
|||
<?php
|
||||
|
||||
require_once 'Wootook/Core/Base/Service/App.php';
|
||||
require_once 'Wootook/Core/Base/BaseObject.php';
|
||||
namespace WootookUnit\Core\Base;
|
||||
|
||||
use Wootook\Core\Base;
|
||||
|
||||
/**
|
||||
* Test class for Wootook\Core\BaseObject.
|
||||
* Generated by PHPUnit on 2011-09-01 at 11:24:52.
|
||||
*/
|
||||
class WootookTest_Core_BaseObjectTest extends PHPUnit_Framework_TestCase
|
||||
class BaseObjectTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* @var Wootook\Core\App\App
|
||||
* @var \Wootook\Core\App\App
|
||||
*/
|
||||
protected $_app;
|
||||
|
||||
|
|
@ -26,7 +27,7 @@ class WootookTest_Core_BaseObjectTest extends PHPUnit_Framework_TestCase
|
|||
|
||||
public function testAppMethod()
|
||||
{
|
||||
$object = new Wootook\Core\Base\BaseObject($this->_app);
|
||||
$object = new Base\BaseObject($this->_app);
|
||||
|
||||
$this->assertAttributeSame($this->_app, '_app', $object);
|
||||
|
||||
|
|
@ -35,7 +36,7 @@ class WootookTest_Core_BaseObjectTest extends PHPUnit_Framework_TestCase
|
|||
|
||||
public function testSetData()
|
||||
{
|
||||
$object = new Wootook\Core\Base\BaseObject($this->_app);
|
||||
$object = new Base\BaseObject($this->_app);
|
||||
|
||||
$this->assertAttributeEmpty('_data', $object);
|
||||
|
||||
|
|
@ -53,7 +54,7 @@ class WootookTest_Core_BaseObjectTest extends PHPUnit_Framework_TestCase
|
|||
*/
|
||||
public function testGetData()
|
||||
{
|
||||
$object = new Wootook\Core\Base\BaseObject($this->_app);
|
||||
$object = new Base\BaseObject($this->_app);
|
||||
|
||||
$object->setData('test', 'testing');
|
||||
|
||||
|
|
@ -71,7 +72,7 @@ class WootookTest_Core_BaseObjectTest extends PHPUnit_Framework_TestCase
|
|||
*/
|
||||
public function testGetAllDatas()
|
||||
{
|
||||
$object = new Wootook\Core\Base\BaseObject($this->_app);
|
||||
$object = new Base\BaseObject($this->_app);
|
||||
|
||||
$object->setData('test', 'testing');
|
||||
|
||||
|
|
@ -89,7 +90,7 @@ class WootookTest_Core_BaseObjectTest extends PHPUnit_Framework_TestCase
|
|||
*/
|
||||
public function testHasData()
|
||||
{
|
||||
$object = new Wootook\Core\Base\BaseObject($this->_app);
|
||||
$object = new Base\BaseObject($this->_app);
|
||||
|
||||
$object->setData('test', 'testing');
|
||||
|
||||
|
|
@ -102,7 +103,7 @@ class WootookTest_Core_BaseObjectTest extends PHPUnit_Framework_TestCase
|
|||
*/
|
||||
public function testAddData()
|
||||
{
|
||||
$object = new Wootook\Core\Base\BaseObject($this->_app);
|
||||
$object = new Base\BaseObject($this->_app);
|
||||
|
||||
$object->setData('test', 'testing');
|
||||
|
||||
|
|
@ -133,7 +134,7 @@ class WootookTest_Core_BaseObjectTest extends PHPUnit_Framework_TestCase
|
|||
*/
|
||||
public function testUnsetData()
|
||||
{
|
||||
$object = new Wootook\Core\Base\BaseObject($this->_app);
|
||||
$object = new Base\BaseObject($this->_app);
|
||||
|
||||
$object->setData('test', 'testing');
|
||||
$object->setData('testing', true);
|
||||
|
|
@ -152,7 +153,7 @@ class WootookTest_Core_BaseObjectTest extends PHPUnit_Framework_TestCase
|
|||
|
||||
public function testClearData()
|
||||
{
|
||||
$object = new Wootook\Core\Base\BaseObject($this->_app);
|
||||
$object = new Base\BaseObject($this->_app);
|
||||
|
||||
$object->setData('test', 'testing');
|
||||
$object->setData('testing', true);
|
||||
|
|
@ -175,7 +176,7 @@ class WootookTest_Core_BaseObjectTest extends PHPUnit_Framework_TestCase
|
|||
*/
|
||||
public function testOffsetExists()
|
||||
{
|
||||
$object = new Wootook\Core\Base\BaseObject($this->_app);
|
||||
$object = new Base\BaseObject($this->_app);
|
||||
|
||||
$object->setData('test', 'testing');
|
||||
|
||||
|
|
@ -188,7 +189,7 @@ class WootookTest_Core_BaseObjectTest extends PHPUnit_Framework_TestCase
|
|||
*/
|
||||
public function testOffsetGet()
|
||||
{
|
||||
$object = new Wootook\Core\Base\BaseObject($this->_app);
|
||||
$object = new Base\BaseObject($this->_app);
|
||||
|
||||
$object->setData('test', 'testing');
|
||||
|
||||
|
|
@ -201,7 +202,7 @@ class WootookTest_Core_BaseObjectTest extends PHPUnit_Framework_TestCase
|
|||
*/
|
||||
public function testOffsetSet()
|
||||
{
|
||||
$object = new Wootook\Core\Base\BaseObject($this->_app);
|
||||
$object = new Base\BaseObject($this->_app);
|
||||
|
||||
$object['test'] = 'testing';
|
||||
|
||||
|
|
@ -214,7 +215,7 @@ class WootookTest_Core_BaseObjectTest extends PHPUnit_Framework_TestCase
|
|||
*/
|
||||
public function testOffsetUnset()
|
||||
{
|
||||
$object = new Wootook\Core\Base\BaseObject($this->_app);
|
||||
$object = new Base\BaseObject($this->_app);
|
||||
|
||||
$object->setData('test', 'testing');
|
||||
|
||||
|
|
@ -1,18 +1,19 @@
|
|||
<?php
|
||||
|
||||
require_once 'Wootook/Core/Config/Node.php';
|
||||
require_once 'Wootook/Core/Exception/CoreException.php';
|
||||
require_once 'Wootook/Core/Exception/RuntimeException.php';
|
||||
namespace WootookUnit\Core\Config;
|
||||
|
||||
use Wootook\Core\Config,
|
||||
Wootook\Core\Exception as CoreException;
|
||||
|
||||
/**
|
||||
* Test class for Wootook\Core\DateTime.
|
||||
* Generated by PHPUnit on 2011-09-01 at 11:24:52.
|
||||
*/
|
||||
class WootookTest_Core_Config_NodeTest extends PHPUnit_Framework_TestCase
|
||||
class NodeTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testCreateEmptyWithoutParent()
|
||||
{
|
||||
$object = new Wootook\Core\Config\Node();
|
||||
$object = new Config\Node();
|
||||
$this->assertAttributeEmpty('_children', $object);
|
||||
$this->assertAttributeEquals(null, '_parent', $object);
|
||||
}
|
||||
|
|
@ -39,8 +40,8 @@ class WootookTest_Core_Config_NodeTest extends PHPUnit_Framework_TestCase
|
|||
|
||||
public function testCreateEmptyWithParent()
|
||||
{
|
||||
$parent = new Wootook\Core\Config\Node();
|
||||
$object = new Wootook\Core\Config\Node(array(), $parent);
|
||||
$parent = new Config\Node();
|
||||
$object = new Config\Node(array(), $parent);
|
||||
|
||||
$this->assertAttributeEmpty('_children', $object);
|
||||
$this->assertAttributeEquals($parent, '_parent', $object);
|
||||
|
|
@ -49,7 +50,7 @@ class WootookTest_Core_Config_NodeTest extends PHPUnit_Framework_TestCase
|
|||
|
||||
public function testDirectChildAccessWithObjectNotation()
|
||||
{
|
||||
$object = new Wootook\Core\Config\Node();
|
||||
$object = new Config\Node();
|
||||
|
||||
$object->testingAttribute = 'testing random data';
|
||||
$this->assertAttributeEquals(array('testing-attribute' => 'testing random data'), '_children', $object);
|
||||
|
|
@ -64,7 +65,7 @@ class WootookTest_Core_Config_NodeTest extends PHPUnit_Framework_TestCase
|
|||
|
||||
public function testDirectChildAccessWithArrayNotation()
|
||||
{
|
||||
$object = new Wootook\Core\Config\Node();
|
||||
$object = new Config\Node();
|
||||
|
||||
$object['testing-attribute'] = 'testing random data';
|
||||
$this->assertAttributeEquals(array('testing-attribute' => 'testing random data'), '_children', $object);
|
||||
|
|
@ -79,7 +80,7 @@ class WootookTest_Core_Config_NodeTest extends PHPUnit_Framework_TestCase
|
|||
|
||||
public function testDirectChildSettingArrayNotationWithoutKey()
|
||||
{
|
||||
$object = new Wootook\Core\Config\Node();
|
||||
$object = new Config\Node();
|
||||
|
||||
$object[] = 'testing random data';
|
||||
$this->assertAttributeEquals(array('testing random data'), '_children', $object);
|
||||
|
|
@ -87,14 +88,14 @@ class WootookTest_Core_Config_NodeTest extends PHPUnit_Framework_TestCase
|
|||
|
||||
public function testDirectChildGettingArrayNotationKeyNotExists()
|
||||
{
|
||||
$object = new Wootook\Core\Config\Node();
|
||||
$object = new Config\Node();
|
||||
|
||||
$this->assertEquals(null, $object['inexistent']);
|
||||
}
|
||||
|
||||
public function testSwitchingArrayNotationToObjectNotation()
|
||||
{
|
||||
$object = new Wootook\Core\Config\Node();
|
||||
$object = new Config\Node();
|
||||
|
||||
$object['testing-attribute'] = 'testing random data';
|
||||
$this->assertEquals('testing random data', $object->testingAttribute);
|
||||
|
|
@ -107,7 +108,7 @@ class WootookTest_Core_Config_NodeTest extends PHPUnit_Framework_TestCase
|
|||
|
||||
public function testSwitchingObjectNotationToArrayNotation()
|
||||
{
|
||||
$object = new Wootook\Core\Config\Node();
|
||||
$object = new Config\Node();
|
||||
|
||||
$object->testingAttribute = 'testing random data';
|
||||
$this->assertEquals('testing random data', $object['testing-attribute']);
|
||||
|
|
@ -120,8 +121,8 @@ class WootookTest_Core_Config_NodeTest extends PHPUnit_Framework_TestCase
|
|||
|
||||
public function testGetConfigByPath()
|
||||
{
|
||||
$parent = new Wootook\Core\Config\Node();
|
||||
$object = new Wootook\Core\Config\Node(array(), $parent);
|
||||
$parent = new Config\Node();
|
||||
$object = new Config\Node(array(), $parent);
|
||||
|
||||
$parent->superChild = $object;
|
||||
$object->testingAttribute = 'testing random data';
|
||||
|
|
@ -131,8 +132,8 @@ class WootookTest_Core_Config_NodeTest extends PHPUnit_Framework_TestCase
|
|||
|
||||
public function testGetConfigAsArray()
|
||||
{
|
||||
$parent = new Wootook\Core\Config\Node();
|
||||
$object = new Wootook\Core\Config\Node(array(), $parent);
|
||||
$parent = new Config\Node();
|
||||
$object = new Config\Node(array(), $parent);
|
||||
|
||||
$parent->superChild = $object;
|
||||
$object->testingAttribute = 'testing random data';
|
||||
|
|
@ -142,7 +143,7 @@ class WootookTest_Core_Config_NodeTest extends PHPUnit_Framework_TestCase
|
|||
|
||||
public function testCount()
|
||||
{
|
||||
$object = new Wootook\Core\Config\Node(array(
|
||||
$object = new Config\Node(array(
|
||||
'first-child' => 1,
|
||||
'second-child' => 2,
|
||||
'3rd-child' => '3rd',
|
||||
|
|
@ -301,7 +302,7 @@ class WootookTest_Core_Config_NodeTest extends PHPUnit_Framework_TestCase
|
|||
'fourth-child' => '4th'
|
||||
);
|
||||
|
||||
$mock = new Wootook\Core\Config\Node($dataItems);
|
||||
$mock = new Config\Node($dataItems);
|
||||
|
||||
$counter = 0;
|
||||
reset($dataItems);
|
||||
|
|
@ -327,7 +328,7 @@ class WootookTest_Core_Config_NodeTest extends PHPUnit_Framework_TestCase
|
|||
'fourth-child' => '4th'
|
||||
);
|
||||
|
||||
$mock = new Wootook\Core\Config\Node($dataItems);
|
||||
$mock = new Config\Node($dataItems);
|
||||
$this->assertInstanceOf('Wootook\\Core\\Config\\Node', $mock->getConfig('second-child'));
|
||||
$this->assertEquals(1, $mock->getConfig('second-child/second-sub-child'));
|
||||
}
|
||||
|
|
@ -344,7 +345,7 @@ class WootookTest_Core_Config_NodeTest extends PHPUnit_Framework_TestCase
|
|||
'fourth-child' => '4th'
|
||||
);
|
||||
|
||||
$mock = new Wootook\Core\Config\Node($dataItems);
|
||||
$mock = new Config\Node($dataItems);
|
||||
$this->assertEquals(null, $mock->getConfig('second-child/third-inexisting-sub-child'));
|
||||
}
|
||||
|
||||
|
|
@ -360,7 +361,7 @@ class WootookTest_Core_Config_NodeTest extends PHPUnit_Framework_TestCase
|
|||
'fourth-child' => '4th'
|
||||
);
|
||||
|
||||
$mock = new Wootook\Core\Config\Node($dataItems);
|
||||
$mock = new Config\Node($dataItems);
|
||||
$this->setExpectedException('Wootook\\Core\\Exception\\RuntimeException');
|
||||
$mock->getConfig('second-child/second-sub-child/inexistent-depth-child');
|
||||
}
|
||||
|
|
@ -377,14 +378,14 @@ class WootookTest_Core_Config_NodeTest extends PHPUnit_Framework_TestCase
|
|||
'fourth-child' => '4th'
|
||||
);
|
||||
|
||||
$object = new Wootook\Core\Config\Node($dataItems);
|
||||
$object = new Config\Node($dataItems);
|
||||
$clone = clone $object;
|
||||
$this->assertEquals($dataItems, $clone->toArray());
|
||||
}
|
||||
|
||||
public function testUseNumericAttribute()
|
||||
{
|
||||
$object = new Wootook\Core\Config\Node();
|
||||
$object = new Config\Node();
|
||||
$object->{1} = 'first-child';
|
||||
$this->assertEquals('first-child', $object->{1});
|
||||
$this->assertEquals(array(1 => 'first-child'), $object->toArray());
|
||||
|
|
@ -422,8 +423,8 @@ class WootookTest_Core_Config_NodeTest extends PHPUnit_Framework_TestCase
|
|||
'fourth-child' => '4th'
|
||||
);
|
||||
|
||||
$root = new Wootook\Core\Config\Node($rootDataItems);
|
||||
$secondary = new Wootook\Core\Config\Node($secondaryDataItems);
|
||||
$root = new Config\Node($rootDataItems);
|
||||
$secondary = new Config\Node($secondaryDataItems);
|
||||
$root->secondChild->merge($secondary);
|
||||
$this->assertEquals($expectedDataItems, $root->toArray());
|
||||
}
|
||||
|
|
@ -440,7 +441,7 @@ class WootookTest_Core_Config_NodeTest extends PHPUnit_Framework_TestCase
|
|||
'fourth-child' => '4th'
|
||||
);
|
||||
|
||||
$object = new Wootook\Core\Config\Node($dataItems);
|
||||
$object = new Config\Node($dataItems);
|
||||
$object->reset();
|
||||
$this->assertEmpty($object->toArray());
|
||||
}
|
||||
|
|
@ -475,7 +476,7 @@ class WootookTest_Core_Config_NodeTest extends PHPUnit_Framework_TestCase
|
|||
'fourth-child' => '4th'
|
||||
);
|
||||
|
||||
$object = new Wootook\Core\Config\Node($dataItems);
|
||||
$object = new Config\Node($dataItems);
|
||||
$object->setConfig('second-child/fourth-sub-child/random-level-child', 72);
|
||||
$this->assertEquals($expected, $object->toArray());
|
||||
}
|
||||
|
|
@ -510,7 +511,7 @@ class WootookTest_Core_Config_NodeTest extends PHPUnit_Framework_TestCase
|
|||
'fourth-child' => '4th'
|
||||
);
|
||||
|
||||
$object = new Wootook\Core\Config\Node($dataItems);
|
||||
$object = new Config\Node($dataItems);
|
||||
$this->setExpectedException('Wootook\\Core\\Exception\\RuntimeException');
|
||||
$object->setConfig('second-child/third-sub-child/random-inexisting-level-child', 72);
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace WootookTest\Core\Database\Sql\Dml\Condition;
|
||||
namespace WootookUnit\Core\Database\Sql\Dml\Condition;
|
||||
|
||||
class ConditionTest
|
||||
extends \PHPUnit_Framework_TestCase
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace WootookTest\Core\Database\Sql\Dml\Condition;
|
||||
namespace WootookUnit\Core\Database\Sql\Dml\Condition;
|
||||
|
||||
use Wootook\Core\Database\Sql\Dml;
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace WootookTest\Core\Database\Sql\Dml\Section;
|
||||
namespace WootookUnit\Core\Database\Sql\Dml\Section;
|
||||
|
||||
use Wootook\Core\Database\Sql\Dml,
|
||||
Wootook\Core\Database\Sql\Dml\Section;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace WootookTest\Core\Database\Sql\Dml\Section;
|
||||
namespace WootookUnit\Core\Database\Sql\Dml\Section;
|
||||
|
||||
include __DIR__ . '/ColumnMock.php';
|
||||
|
||||
|
|
@ -12,7 +12,7 @@ class ColumnTest
|
|||
public function setUp()
|
||||
{
|
||||
$adapter = $this->getMockForAbstractClass('Wootook\\Core\\Database\\Adapter\\Adapter');
|
||||
$this->_mock = $this->getMockForAbstractClass('WootookTest\\Core\\Database\\Sql\\Dml\\Section\\ColumnMock', array($adapter));
|
||||
$this->_mock = $this->getMockForAbstractClass('WootookUnit\\Core\\Database\\Sql\\Dml\\Section\\ColumnMock', array($adapter));
|
||||
}
|
||||
|
||||
public function testAddColumnWithoutTableWithoutAlias()
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace WootookTest\Core\Database\Sql\Dml\Section;
|
||||
namespace WootookUnit\Core\Database\Sql\Dml\Section;
|
||||
|
||||
use Wootook\Core\Database\Sql\Dml,
|
||||
Wootook\Core\Database\Sql\Dml\Section;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace WootookTest\Core\Database\Sql\Dml\Section;
|
||||
namespace WootookUnit\Core\Database\Sql\Dml\Section;
|
||||
|
||||
include __DIR__ . '/FromMock.php';
|
||||
|
||||
|
|
@ -12,7 +12,7 @@ class FromTest
|
|||
public function setUp()
|
||||
{
|
||||
$adapter = $this->getMockForAbstractClass('Wootook\\Core\\Database\\Adapter\\Adapter');
|
||||
$this->_mock = $this->getMockForAbstractClass('WootookTest\\Core\\Database\\Sql\\Dml\\Section\\FromMock', array($adapter));
|
||||
$this->_mock = $this->getMockForAbstractClass('WootookUnit\\Core\\Database\\Sql\\Dml\\Section\\FromMock', array($adapter));
|
||||
}
|
||||
|
||||
public function testSetOneTableWithoutSchemaWithoutAlias()
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace WootookTest\Core\Database\Sql\Dml\Section;
|
||||
namespace WootookUnit\Core\Database\Sql\Dml\Section;
|
||||
|
||||
use Wootook\Core\Database\Sql\Dml,
|
||||
Wootook\Core\Database\Sql\Dml\Section;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace WootookTest\Core\Database\Sql\Dml\Section;
|
||||
namespace WootookUnit\Core\Database\Sql\Dml\Section;
|
||||
|
||||
include __DIR__ . '/IntoMock.php';
|
||||
|
||||
|
|
@ -12,7 +12,7 @@ class IntoTest
|
|||
public function setUp()
|
||||
{
|
||||
$adapter = $this->getMockForAbstractClass('Wootook\\Core\\Database\\Adapter\\Adapter');
|
||||
$this->_mock = $this->getMockForAbstractClass('WootookTest\\Core\\Database\\Sql\\Dml\\Section\\IntoMock', array($adapter));
|
||||
$this->_mock = $this->getMockForAbstractClass('WootookUnit\\Core\\Database\\Sql\\Dml\\Section\\IntoMock', array($adapter));
|
||||
}
|
||||
|
||||
public function testSetTableWithoutSchema()
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace WootookTest\Core\Database\Sql\Dml\Section;
|
||||
namespace WootookUnit\Core\Database\Sql\Dml\Section;
|
||||
|
||||
use Wootook\Core\Database\Sql\Dml,
|
||||
Wootook\Core\Database\Sql\Dml\Section;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace WootookTest\Core\Database\Sql\Dml\Section;
|
||||
namespace WootookUnit\Core\Database\Sql\Dml\Section;
|
||||
|
||||
include __DIR__ . '/LimitMock.php';
|
||||
|
||||
|
|
@ -12,7 +12,7 @@ class LimitTest
|
|||
public function setUp()
|
||||
{
|
||||
$adapter = $this->getMockForAbstractClass('Wootook\\Core\\Database\\Adapter\\Adapter');
|
||||
$this->_mock = $this->getMockForAbstractClass('WootookTest\\Core\\Database\\Sql\\Dml\\Section\\LimitMock', array($adapter));
|
||||
$this->_mock = $this->getMockForAbstractClass('WootookUnit\\Core\\Database\\Sql\\Dml\\Section\\LimitMock', array($adapter));
|
||||
}
|
||||
|
||||
public function testSetLimitWithoutOffset()
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace WootookTest\Core\Database\Sql\Dml\Section\Renderer;
|
||||
namespace WootookUnit\Core\Database\Sql\Dml\Section\Renderer;
|
||||
|
||||
use Wootook\Core\Database\Sql\Dml,
|
||||
Wootook\Core\Database\Sql\Dml\Section\Renderer;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace WootookTest\Core\Database\Sql\Dml\Section\Renderer;
|
||||
namespace WootookUnit\Core\Database\Sql\Dml\Section\Renderer;
|
||||
|
||||
include __DIR__ . '/ColumnMock.php';
|
||||
|
||||
|
|
@ -19,8 +19,8 @@ class ColumnTest
|
|||
->will($this->returnArgument(0))
|
||||
;
|
||||
|
||||
$this->_queryMock = $this->getMockForAbstractClass('WootookTest\\Core\\Database\\Sql\\Dml\\Section\\ColumnMock', array($adapterMock));
|
||||
$this->_rendererMock = $this->getMockForAbstractClass('WootookTest\\Core\\Database\\Sql\\Dml\\Section\\Renderer\\ColumnMock');
|
||||
$this->_queryMock = $this->getMockForAbstractClass('WootookUnit\\Core\\Database\\Sql\\Dml\\Section\\ColumnMock', array($adapterMock));
|
||||
$this->_rendererMock = $this->getMockForAbstractClass('WootookUnit\\Core\\Database\\Sql\\Dml\\Section\\Renderer\\ColumnMock');
|
||||
}
|
||||
|
||||
public function testRenderColumnWithoutTableWithoutAlias()
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace WootookTest\Core\Database\Sql\Dml\Section\Renderer;
|
||||
namespace WootookUnit\Core\Database\Sql\Dml\Section\Renderer;
|
||||
|
||||
use Wootook\Core\Database\Sql\Dml,
|
||||
Wootook\Core\Database\Sql\Dml\Section\Renderer;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace WootookTest\Core\Database\Sql\Dml\Section\Renderer;
|
||||
namespace WootookUnit\Core\Database\Sql\Dml\Section\Renderer;
|
||||
|
||||
include __DIR__ . '/FromMock.php';
|
||||
|
||||
|
|
@ -19,8 +19,8 @@ class FromTest
|
|||
->will($this->returnArgument(0))
|
||||
;
|
||||
|
||||
$this->_queryMock = $this->getMockForAbstractClass('WootookTest\\Core\\Database\\Sql\\Dml\\Section\\FromMock', array($adapterMock));
|
||||
$this->_rendererMock = $this->getMockForAbstractClass('WootookTest\\Core\\Database\\Sql\\Dml\\Section\\Renderer\\FromMock');
|
||||
$this->_queryMock = $this->getMockForAbstractClass('WootookUnit\\Core\\Database\\Sql\\Dml\\Section\\FromMock', array($adapterMock));
|
||||
$this->_rendererMock = $this->getMockForAbstractClass('WootookUnit\\Core\\Database\\Sql\\Dml\\Section\\Renderer\\FromMock');
|
||||
}
|
||||
|
||||
public function testRenderOneTableWithoutSchemaWithoutAlias()
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace WootookTest\Core\Database\Sql\Dml\Section\Renderer;
|
||||
namespace WootookUnit\Core\Database\Sql\Dml\Section\Renderer;
|
||||
|
||||
use Wootook\Core\Database\Sql\Dml,
|
||||
Wootook\Core\Database\Sql\Dml\Section\Renderer;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace WootookTest\Core\Database\Sql\Dml\Section\Renderer;
|
||||
namespace WootookUnit\Core\Database\Sql\Dml\Section\Renderer;
|
||||
|
||||
include __DIR__ . '/IntoMock.php';
|
||||
|
||||
|
|
@ -19,8 +19,8 @@ class IntoTest
|
|||
->will($this->returnArgument(0))
|
||||
;
|
||||
|
||||
$this->_queryMock = $this->getMockForAbstractClass('WootookTest\\Core\\Database\\Sql\\Dml\\Section\\IntoMock', array($adapterMock));
|
||||
$this->_rendererMock = $this->getMockForAbstractClass('WootookTest\\Core\\Database\\Sql\\Dml\\Section\\Renderer\\IntoMock');
|
||||
$this->_queryMock = $this->getMockForAbstractClass('WootookUnit\\Core\\Database\\Sql\\Dml\\Section\\IntoMock', array($adapterMock));
|
||||
$this->_rendererMock = $this->getMockForAbstractClass('WootookUnit\\Core\\Database\\Sql\\Dml\\Section\\Renderer\\IntoMock');
|
||||
}
|
||||
|
||||
public function testRenderTableWithoutSchema()
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace WootookTest\Core\Database\Sql\Dml\Section\Renderer;
|
||||
namespace WootookUnit\Core\Database\Sql\Dml\Section\Renderer;
|
||||
|
||||
use Wootook\Core\Database\Sql\Dml,
|
||||
Wootook\Core\Database\Sql\Dml\Section\Renderer;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace WootookTest\Core\Database\Sql\Dml\Section\Renderer;
|
||||
namespace WootookUnit\Core\Database\Sql\Dml\Section\Renderer;
|
||||
|
||||
include __DIR__ . '/LimitMock.php';
|
||||
|
||||
|
|
@ -13,8 +13,8 @@ class LimitTest
|
|||
public function setUp()
|
||||
{
|
||||
$adapter = $this->getMockForAbstractClass('Wootook\\Core\\Database\\Adapter\\Adapter');
|
||||
$this->_queryMock = $this->getMockForAbstractClass('WootookTest\\Core\\Database\\Sql\\Dml\\Section\\LimitMock', array($adapter));
|
||||
$this->_rendererMock = $this->getMockForAbstractClass('WootookTest\\Core\\Database\\Sql\\Dml\\Section\\Renderer\\LimitMock');
|
||||
$this->_queryMock = $this->getMockForAbstractClass('WootookUnit\\Core\\Database\\Sql\\Dml\\Section\\LimitMock', array($adapter));
|
||||
$this->_rendererMock = $this->getMockForAbstractClass('WootookUnit\\Core\\Database\\Sql\\Dml\\Section\\Renderer\\LimitMock');
|
||||
}
|
||||
|
||||
public function testRenderLimitWithoutOffset()
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace WootookTest\Core\Database\Sql\Dml\Section\Renderer;
|
||||
namespace WootookUnit\Core\Database\Sql\Dml\Section\Renderer;
|
||||
|
||||
use Wootook\Core\Database\Sql\Dml,
|
||||
Wootook\Core\Database\Sql\Dml\Section\Renderer;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace WootookTest\Core\Database\Sql\Dml\Section\Renderer;
|
||||
namespace WootookUnit\Core\Database\Sql\Dml\Section\Renderer;
|
||||
|
||||
include __DIR__ . '/SetMock.php';
|
||||
|
||||
|
|
@ -24,8 +24,8 @@ class SetTest
|
|||
->will($this->returnArgument(0))
|
||||
;
|
||||
|
||||
$this->_queryMock = $this->getMockForAbstractClass('WootookTest\\Core\\Database\\Sql\\Dml\\Section\\SetMock', array($adapterMock));
|
||||
$this->_rendererMock = $this->getMockForAbstractClass('WootookTest\\Core\\Database\\Sql\\Dml\\Section\\Renderer\\SetMock');
|
||||
$this->_queryMock = $this->getMockForAbstractClass('WootookUnit\\Core\\Database\\Sql\\Dml\\Section\\SetMock', array($adapterMock));
|
||||
$this->_rendererMock = $this->getMockForAbstractClass('WootookUnit\\Core\\Database\\Sql\\Dml\\Section\\Renderer\\SetMock');
|
||||
}
|
||||
|
||||
public function testRenderFieldAndValue()
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace WootookTest\Core\Database\Sql\Dml\Section;
|
||||
namespace WootookUnit\Core\Database\Sql\Dml\Section;
|
||||
|
||||
use Wootook\Core\Database\Sql\Dml,
|
||||
Wootook\Core\Database\Sql\Dml\Section;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace WootookTest\Core\Database\Sql\Dml\Section;
|
||||
namespace WootookUnit\Core\Database\Sql\Dml\Section;
|
||||
|
||||
include __DIR__ . '/SetMock.php';
|
||||
|
||||
|
|
@ -12,7 +12,7 @@ class SetTest
|
|||
public function setUp()
|
||||
{
|
||||
$adapter = $this->getMockForAbstractClass('Wootook\\Core\\Database\\Adapter\\Adapter');
|
||||
$this->_mock = $this->getMockForAbstractClass('WootookTest\\Core\\Database\\Sql\\Dml\\Section\\SetMock', array($adapter));
|
||||
$this->_mock = $this->getMockForAbstractClass('WootookUnit\\Core\\Database\\Sql\\Dml\\Section\\SetMock', array($adapter));
|
||||
}
|
||||
|
||||
public function testSetFieldAndValue()
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace WootookTest\Core\Database\Sql\Dml\Section;
|
||||
namespace WootookUnit\Core\Database\Sql\Dml\Section;
|
||||
|
||||
use Wootook\Core\Database\Sql\Dml,
|
||||
Wootook\Core\Database\Sql\Dml\Section;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace WootookTest\Core\Database\Sql\Dml\Section;
|
||||
namespace WootookUnit\Core\Database\Sql\Dml\Section;
|
||||
|
||||
include __DIR__ . '/WhereMock.php';
|
||||
|
||||
|
|
@ -12,7 +12,7 @@ class WhereTest
|
|||
public function setUp()
|
||||
{
|
||||
$adapter = $this->getMockForAbstractClass('Wootook\\Core\\Database\\Adapter\\Adapter');
|
||||
$this->_mock = $this->getMockForAbstractClass('WootookTest\\Core\\Database\\Sql\\Dml\\Section\\WhereMock', array($adapter));
|
||||
$this->_mock = $this->getMockForAbstractClass('WootookUnit\\Core\\Database\\Sql\\Dml\\Section\\WhereMock', array($adapter));
|
||||
}
|
||||
|
||||
public function testAddScalarCondition()
|
||||
|
|
@ -6,7 +6,7 @@ require_once 'Wootook/Core/DateTime/DateTime.php';
|
|||
* Test class for Wootook\Core\DateTime\DateTime.
|
||||
* Generated by PHPUnit on 2011-09-01 at 11:24:52.
|
||||
*/
|
||||
class WootookTest_Core_DateTime_DateTimeTest extends PHPUnit_Framework_TestCase
|
||||
class WootookUnit_Core_DateTime_DateTimeTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testTimestamp()
|
||||
{
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace WootookTest\Core\DependencyInjection\Definition;
|
||||
namespace WootookUnit\Core\DependencyInjection\Definition;
|
||||
|
||||
use Wootook\Core\DependencyInjection,
|
||||
Wootook\Core\DependencyInjection\Definition;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace WootookTest\Core\DependencyInjection\Definition;
|
||||
namespace WootookUnit\Core\DependencyInjection\Definition;
|
||||
|
||||
use Wootook\Core\Config,
|
||||
Wootook\Core\DependencyInjection\Definition;
|
||||
|
|
@ -15,7 +15,7 @@ class ClassDefinitionTest extends \PHPUnit_Framework_TestCase
|
|||
|
||||
public function testClassDefinitionInstantiation_withSpecialMethodDefinitionClassName()
|
||||
{
|
||||
$methodDefinitionClassName = \uniqid('WootookTest_Core_DependencyInjection_Mock_MethodDefinition_TestNewInstance_');
|
||||
$methodDefinitionClassName = \uniqid('WootookUnit_Core_DependencyInjection_Mock_MethodDefinition_TestNewInstance_');
|
||||
$this->getMock('Wootook\\Core\\DependencyInjection\\Definition\\MethodDefinition', array(), array(), $methodDefinitionClassName, false);
|
||||
|
||||
$definition = new Definition\ClassDefinition(__CLASS__, $methodDefinitionClassName);
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace WootookTest\Core\DependencyInjection\Definition;
|
||||
namespace WootookUnit\Core\DependencyInjection\Definition;
|
||||
|
||||
use Wootook\Core\Config,
|
||||
Wootook\Core\DependencyInjection\Definition;
|
||||
|
|
@ -27,7 +27,7 @@ class MethodDefinitionTest extends \PHPUnit_Framework_TestCase
|
|||
|
||||
public function testMethodDefinitionInstantiation_withoutRegistry_withSpecialArgumentDefinitionClassName()
|
||||
{
|
||||
$argumentDefinitionClassName = \uniqid('WootookTest_Core_DependencyInjection_Mock_ArgumentDefinition_TestNewInstance_');
|
||||
$argumentDefinitionClassName = \uniqid('WootookUnit_Core_DependencyInjection_Mock_ArgumentDefinition_TestNewInstance_');
|
||||
$this->getMock('Wootook\\Core\\DependencyInjection\\Definition\\ArgumentDefinition', array(), array(), $argumentDefinitionClassName, false);
|
||||
|
||||
$mock = $this->getMock('Wootook\\Core\\DependencyInjection\\Definition\\ClassDefinition', array(), array(), '', false);
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace WootookTest\Core\DependencyInjection;
|
||||
namespace WootookUnit\Core\DependencyInjection;
|
||||
|
||||
/**
|
||||
* Test class for Wootook\Core\BaseObject.
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace WootookTest\Core\DependencyInjection;
|
||||
namespace WootookUnit\Core\DependencyInjection;
|
||||
|
||||
/**
|
||||
* Test class for Wootook\Core\BaseObject.
|
||||
24
src/application/modules/WootookCore/test/phpunit.xml
Normal file
24
src/application/modules/WootookCore/test/phpunit.xml
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<phpunit backupGlobals="false"
|
||||
backupStaticAttributes="false"
|
||||
colors="true"
|
||||
convertErrorsToExceptions="true"
|
||||
convertNoticesToExceptions="true"
|
||||
convertWarningsToExceptions="true"
|
||||
processIsolation="false"
|
||||
stopOnFailure="false"
|
||||
syntaxCheck="false"
|
||||
bootstrap="./bootstrap.php"
|
||||
>
|
||||
|
||||
<testsuites>
|
||||
<testsuite name="Wootook Core module - Unit tests">
|
||||
<directory>./php/WootookTest/Core</directory>
|
||||
</testsuite>
|
||||
<!--
|
||||
<testsuite name="Wootook Core module - Integration tests">
|
||||
<directory>./php/WootookIntegration/Core</directory>
|
||||
</testsuite>
|
||||
-->
|
||||
</testsuites>
|
||||
</phpunit>
|
||||
Loading…
Reference in a new issue