Skip to content

Commit 10cebb3

Browse files
committed
added db config to travis.yml
Password for db users postgres password change enabled php memcache module Removed PHP test suites (AllTests, AllValidationsTest) Added test/helpers/config.php as bootstrap file
1 parent 93077ea commit 10cebb3

34 files changed

+13
-83
lines changed

.travis.yml

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
before_script:
2+
- echo 'extension = "memcache.so"' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
3+
- mysql -e "USE mysql;UPDATE user SET password=PASSWORD('password') WHERE user='root';FLUSH PRIVILEGES;"
4+
- mysql -e 'CREATE DATABASE phpar_test;'
5+
- psql -c 'CREATE DATABASE phpar_test;' -U postgres
6+
- psql -c "ALTER USER postgres WITH PASSWORD 'password';" -U postgres
7+
8+
services:
9+
- memcache
10+
11+
env: PHPAR_MYSQL=mysql://root:[email protected]/phpar_test PHPAR_PGSQL=pgsql://postgres:[email protected]/phpar_test
12+
113
language: php
214
php:
315
- 5.3

phpunit.xml

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,2 @@
1-
<phpunit>
2-
<testSuites>
3-
<testSuite name="default">
4-
<directory>test/</directory>
5-
</testSuite>
6-
</testSuites>
1+
<phpunit bootstrap="test/helpers/config.php">
72
</phpunit>

test/ActiveRecordCacheTest.php

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<?php
2-
include 'helpers/config.php';
3-
42
use ActiveRecord\Cache;
53

64
class ActiveRecordCacheTest extends DatabaseTest

test/ActiveRecordFindTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
include 'helpers/config.php';
32

43
class ActiveRecordFindTest extends DatabaseTest
54
{

test/ActiveRecordTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
include 'helpers/config.php';
32

43
class ActiveRecordTest extends DatabaseTest
54
{

test/ActiveRecordWriteTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
include 'helpers/config.php';
32
use ActiveRecord\DateTime;
43

54
class DirtyAuthor extends ActiveRecord\Model

test/AllTests.php

-24
This file was deleted.

test/AllValidationsTest.php

-21
This file was deleted.

test/CacheTest.php

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<?php
2-
include 'helpers/config.php';
3-
42
use ActiveRecord\Cache;
53

64
class CacheTest extends SnakeCase_PHPUnit_Framework_TestCase

test/CallbackTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
include 'helpers/config.php';
32

43
class CallBackTest extends DatabaseTest
54
{

test/ColumnTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
include 'helpers/config.php';
32

43
use ActiveRecord\Column;
54
use ActiveRecord\DateTime;

test/ConfigTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
include 'helpers/config.php';
32

43
use ActiveRecord\Config;
54
use ActiveRecord\ConfigException;

test/ConnectionManagerTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
include 'helpers/config.php';
32

43
use ActiveRecord\Config;
54
use ActiveRecord\ConnectionManager;

test/ConnectionTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php
22
use ActiveRecord\Connection;
33

4-
include 'helpers/config.php';
54

65
// Only use this to test static methods in Connection that are not specific
76
// to any database adapter.

test/DateFormatTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
include 'helpers/config.php';
32

43
class DateFormatTest extends DatabaseTest
54
{

test/DateTimeTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
include 'helpers/config.php';
32
use ActiveRecord\DateTime as DateTime;
43
use ActiveRecord\DatabaseException;
54

test/ExpressionsTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
include 'helpers/config.php';
32
require_once __DIR__ . '/../lib/Expressions.php';
43

54
use ActiveRecord\Expressions;

test/HasManyThroughTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
include 'helpers/config.php';
32
include 'helpers/foo.php';
43

54
use foo\bar\biz\User;

test/InflectorTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
include 'helpers/config.php';
32
require_once __DIR__ . '/../lib/Inflector.php';
43

54
class InflectorTest extends SnakeCase_PHPUnit_Framework_TestCase

test/ModelCallbackTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
include 'helpers/config.php';
32

43
class ModelCallbackTest extends DatabaseTest
54
{

test/MysqlAdapterTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php
22
use ActiveRecord\Column;
33

4-
include 'helpers/config.php';
54
require_once __DIR__ . '/../lib/adapters/MysqlAdapter.php';
65

76
class MysqlAdapterTest extends AdapterTest

test/OciAdapterTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
include 'helpers/config.php';
32
require_once __DIR__ . '/../lib/adapters/OciAdapter.php';
43

54
class OciAdapterTest extends AdapterTest

test/PgsqlAdapterTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php
22
use ActiveRecord\Column;
33

4-
include 'helpers/config.php';
54
require_once __DIR__ . '/../lib/adapters/PgsqlAdapter.php';
65

76
class PgsqlAdapterTest extends AdapterTest

test/RelationshipTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
include 'helpers/config.php';
32

43
class NotModel {};
54

test/SQLBuilderTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
include 'helpers/config.php';
32

43
use ActiveRecord\SQLBuilder;
54
use ActiveRecord\Table;

test/SerializationTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
include 'helpers/config.php';
32
require_once __DIR__ . '/../lib/Serialization.php';
43

54
use ActiveRecord\DateTime;

test/SqliteAdapterTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
include 'helpers/config.php';
32
require_once __DIR__ . '/../lib/adapters/SqliteAdapter.php';
43

54
class SqliteAdapterTest extends AdapterTest

test/UtilsTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
include 'helpers/config.php';
32

43
use ActiveRecord as AR;
54

test/ValidatesFormatOfTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
include 'helpers/config.php';
32

43
class BookFormat extends ActiveRecord\Model
54
{

test/ValidatesInclusionAndExclusionOfTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
include 'helpers/config.php';
32

43
class BookExclusion extends ActiveRecord\Model
54
{

test/ValidatesLengthOfTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
include 'helpers/config.php';
32

43
class BookLength extends ActiveRecord\Model
54
{

test/ValidatesNumericalityOfTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
include 'helpers/config.php';
32

43
class BookNumericality extends ActiveRecord\Model
54
{

test/ValidatesPresenceOfTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
include 'helpers/config.php';
32

43
class BookPresence extends ActiveRecord\Model
54
{

test/ValidationsTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
include 'helpers/config.php';
32

43
use ActiveRecord as AR;
54

0 commit comments

Comments
 (0)