FIX: Simpler matrix, polish test.
This commit is contained in:
parent
b9af2d0734
commit
5897559cd2
16
.travis.yml
16
.travis.yml
|
@ -4,14 +4,14 @@ sudo: false
|
|||
|
||||
language: php
|
||||
|
||||
php:
|
||||
- 5.6
|
||||
- 7.0
|
||||
- 7.1
|
||||
|
||||
env:
|
||||
- DB=MYSQL CORE_RELEASE=4
|
||||
- DB=PGSQL CORE_RELEASE=4
|
||||
matrix:
|
||||
include:
|
||||
- php: 5.6
|
||||
env: DB=MYSQL CORE_RELEASE=4
|
||||
- php: 7.0
|
||||
env: DB=PGSQL CORE_RELEASE=4
|
||||
- php: 7.1
|
||||
env: DB=MYSQL CORE_RELEASE=4
|
||||
|
||||
before_script:
|
||||
- composer self-update || true
|
||||
|
|
|
@ -18,7 +18,8 @@
|
|||
"silverstripe/framework": "^4.0@dev"
|
||||
},
|
||||
"require-dev": {
|
||||
"hafriedlander/phockito": "dev-master"
|
||||
"hafriedlander/phockito": "dev-master",
|
||||
"silverstripe/versioned": "^1.0@dev"
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
|
|
|
@ -28,9 +28,10 @@ class EnvironmentCheckerTest extends SapphireTest
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function setUpOnce()
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
parent::setUpOnce();
|
||||
parent::setUpBeforeClass();
|
||||
|
||||
Phockito::include_hamcrest();
|
||||
|
||||
$logger = Injector::inst()->get(LoggerInterface::class);
|
||||
|
@ -70,7 +71,7 @@ class EnvironmentCheckerTest extends SapphireTest
|
|||
);
|
||||
|
||||
$response = $checker->index();
|
||||
Phockito::verify($checker, 0)->log(anything(), anything());
|
||||
Phockito::verify($checker, 0)->log(\anything(), \anything());
|
||||
EnvironmentCheckSuite::reset();
|
||||
}
|
||||
|
||||
|
@ -87,8 +88,8 @@ class EnvironmentCheckerTest extends SapphireTest
|
|||
);
|
||||
|
||||
$response = $checker->index();
|
||||
Phockito::verify($checker, 1)->log(containsString('warning'), anything());
|
||||
Phockito::verify($checker, 0)->log(containsString('error'), anything());
|
||||
Phockito::verify($checker, 1)->log(containsString('warning'), \anything());
|
||||
Phockito::verify($checker, 0)->log(containsString('error'), \anything());
|
||||
EnvironmentCheckSuite::reset();
|
||||
}
|
||||
|
||||
|
@ -105,8 +106,8 @@ class EnvironmentCheckerTest extends SapphireTest
|
|||
);
|
||||
|
||||
$response = $checker->index();
|
||||
Phockito::verify($checker, 0)->log(containsString('warning'), anything());
|
||||
Phockito::verify($checker, 1)->log(containsString('error'), anything());
|
||||
Phockito::verify($checker, 0)->log(containsString('warning'), \anything());
|
||||
Phockito::verify($checker, 1)->log(containsString('error'), \anything());
|
||||
EnvironmentCheckSuite::reset();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue