Permalink
Browse files

updated to run from Phing build script

git-svn-id: http://mongodb-morph.googlecode.com/svn/trunk@53 406649b4-5d4b-11de-8abc-d1c337b90d21
  • Loading branch information...
1 parent 917f783 commit b5e401097d2ac22c19234239f14b541d3862f7a7 XirisR committed Jan 8, 2010
View
10 mongodb-morph/integration-tests/MongoTestCase.php
@@ -6,11 +6,11 @@
require_once 'PHPUnit/Framework/TestCase.php';
-require_once '../Morph.phar';
-require_once 'MongoConstraint/CollectionExists.php';
-require_once 'MongoConstraint/CollectionDoesNotExist.php';
-require_once 'MongoConstraint/DocumentExists.php';
-require_once 'MongoConstraint/DocumentPropertyEquals.php';
+require_once dirname(__FILE__).'/../Morph.phar';
+require_once dirname(__FILE__).'/MongoConstraint/CollectionExists.php';
+require_once dirname(__FILE__).'/MongoConstraint/CollectionDoesNotExist.php';
+require_once dirname(__FILE__).'/MongoConstraint/DocumentExists.php';
+require_once dirname(__FILE__).'/MongoConstraint/DocumentPropertyEquals.php';
/**
* Mongo Test Case
View
6 mongodb-morph/integration-tests/TestComposeMany.php
@@ -4,9 +4,9 @@
* @copyright 2010 Jonathan Moss
*/
-require_once 'MongoTestCase.php';
-require_once 'test-objects/ComposeManyParent.php';
-require_once 'test-objects/Child.php';
+require_once dirname(__FILE__).'/MongoTestCase.php';
+require_once dirname(__FILE__).'/test-objects/ComposeManyParent.php';
+require_once dirname(__FILE__).'/test-objects/Child.php';
class TestComposeMany extends MongoTestCase
{
View
6 mongodb-morph/integration-tests/TestComposeOne.php
@@ -4,9 +4,9 @@
* @copyright 2010 Jonathan Moss
*/
-require_once 'MongoTestCase.php';
-require_once 'test-objects/ComposeOneParent.php';
-require_once 'test-objects/Child.php';
+require_once dirname(__FILE__).'/MongoTestCase.php';
+require_once dirname(__FILE__).'/test-objects/ComposeOneParent.php';
+require_once dirname(__FILE__).'/test-objects/Child.php';
class TestComposeOne extends MongoTestCase
{
View
10 mongodb-morph/integration-tests/TestFileProperty.php
@@ -3,8 +3,8 @@
* @author Jonathan Moss <xirisr@gmail.com>
* @copyright 2010 Jonathan Moss
*/
-require_once 'MongoTestCase.php';
-require_once 'test-objects/User.php';
+require_once dirname(__FILE__).'/MongoTestCase.php';
+require_once dirname(__FILE__).'/test-objects/User.php';
class TestFileProperty extends MongoTestCase
{
@@ -24,21 +24,21 @@ public function setUp()
public function tearDown()
{
parent::tearDown();
- unlink('test.png');
+ unlink(dirname(__FILE__).'/test.png');
}
public function testStoresUserAndFile()
{
$user = new User();
$user->Username = 'a_musing_moose';
- $user->Avatar = realpath('resources/flask.png');
+ $user->Avatar = dirname(__FILE__).'/resources/flask.png';
$this->storage->save($user);
sleep(1); //MongoDB can take a sec to allocate the collection files
$this->assertCollectionExists('User');
$this->assertDocumentExists('User', $user->id());
$user->Avatar->write("test.png");
$this->assertFileExists('test.png');
- $originalFileHash = md5_file('resources/flask.png');
+ $originalFileHash = md5_file(dirname(__FILE__).'/resources/flask.png');
$retrievedFileHash = md5_file('test.png');
$this->assertEquals($originalFileHash, $retrievedFileHash);
}
View
6 mongodb-morph/integration-tests/TestHasMany.php
@@ -3,9 +3,9 @@
* @author Jonathan Moss <xirisr@gmail.com>
* @copyright 2010 Jonathan Moss
*/
-require_once 'MongoTestCase.php';
-require_once 'test-objects/HasManyParent.php';
-require_once 'test-objects/Child.php';
+require_once dirname(__FILE__).'/MongoTestCase.php';
+require_once dirname(__FILE__).'/test-objects/HasManyParent.php';
+require_once dirname(__FILE__).'/test-objects/Child.php';
class TestHasMany extends MongoTestCase
{
View
6 mongodb-morph/integration-tests/TestHasOne.php
@@ -4,9 +4,9 @@
* @copyright 2010 Jonathan Moss
*/
-require_once 'MongoTestCase.php';
-require_once 'test-objects/HasOneParent.php';
-require_once 'test-objects/Child.php';
+require_once dirname(__FILE__).'/MongoTestCase.php';
+require_once dirname(__FILE__).'/test-objects/HasOneParent.php';
+require_once dirname(__FILE__).'/test-objects/Child.php';
class TestHasOne extends MongoTestCase
{
View
6 mongodb-morph/integration-tests/TestSingleObject.php
@@ -4,9 +4,9 @@
* @copyright 2010 Jonathan Moss
*/
-require_once 'MongoTestCase.php';
-require_once 'test-objects/HasOneParent.php';
-require_once 'test-objects/Child.php';
+require_once dirname(__FILE__).'/MongoTestCase.php';
+require_once dirname(__FILE__).'/test-objects/HasOneParent.php';
+require_once dirname(__FILE__).'/test-objects/Child.php';
class TestSingleObject extends MongoTestCase
{

0 comments on commit b5e4010

Please sign in to comment.