Skip to content

Commit

Permalink
check connection to mongo in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sokil committed Oct 19, 2014
1 parent 1f07d7e commit 5a22240
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 96 deletions.
14 changes: 0 additions & 14 deletions migrations/20140531183810_InititalRevision.php

This file was deleted.

14 changes: 0 additions & 14 deletions migrations/20140531201019_Test1.php

This file was deleted.

14 changes: 0 additions & 14 deletions migrations/20140531201024_Test2.php

This file was deleted.

14 changes: 0 additions & 14 deletions migrations/20140531201025_Test3.php

This file was deleted.

14 changes: 0 additions & 14 deletions migrations/20140531201027_Test4.php

This file was deleted.

14 changes: 0 additions & 14 deletions migrations/20140531201029_Test5.php

This file was deleted.

8 changes: 8 additions & 0 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,11 @@
$loader = require __DIR__ . "/../vendor/autoload.php";
$loader->add('Sokil\\Mongo\\Migrator\\', __DIR__);

// check mongo connection presence
$client = new \Sokil\Mongo\Client();
try {
$client->getMongoClient()->connect();
} catch (MongoConnectionException $e) {
die('Error connecting to mongo server');
}

4 changes: 2 additions & 2 deletions tests/migrations/20140531183810_InititalRevision.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ class InititalRevision extends \Sokil\Mongo\Migrator\AbstractMigration
{
public function up()
{
echo 'up';

}

public function down()
{
echo 'down';

}
}
4 changes: 2 additions & 2 deletions tests/migrations/20140531201019_Test1.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ class Test1 extends \Sokil\Mongo\Migrator\AbstractMigration
{
public function up()
{
echo 'up1';

}

public function down()
{
echo 'down1';

}
}
4 changes: 2 additions & 2 deletions tests/migrations/20140531201024_Test2.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ class Test2 extends \Sokil\Mongo\Migrator\AbstractMigration
{
public function up()
{
echo 'up2';

}

public function down()
{
echo 'down2';

}
}
4 changes: 2 additions & 2 deletions tests/migrations/20140531201025_Test3.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ class Test3 extends \Sokil\Mongo\Migrator\AbstractMigration
{
public function up()
{
echo 'up3';

}

public function down()
{
echo 'down3';

}
}
4 changes: 2 additions & 2 deletions tests/migrations/20140531201027_Test4.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ class Test4 extends \Sokil\Mongo\Migrator\AbstractMigration
{
public function up()
{
echo 'up4';

}

public function down()
{
echo 'down4';

}
}
4 changes: 2 additions & 2 deletions tests/migrations/20140531201029_Test5.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ class Test5 extends \Sokil\Mongo\Migrator\AbstractMigration
{
public function up()
{
echo 'up5';

}

public function down()
{
echo 'down5';

}
}

0 comments on commit 5a22240

Please sign in to comment.