Merge branch '3.5' into pulls/3.5/update-pwd-encryption-on-change

This commit is contained in:
Damian Mooyman 2017-11-27 14:42:32 +13:00 committed by GitHub
commit bac5f4c8aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 17 additions and 18 deletions

View File

@ -8,6 +8,7 @@ addons:
apt:
packages:
- tidy
firefox: "31.0"
matrix:
include:

View File

@ -30,13 +30,10 @@ class ConfigManifestTest extends SapphireTest {
* @return Zend_Cache_Core
*/
protected function getCacheMock() {
return $this->getMock(
'Zend_Cache_Core',
array('load', 'save'),
array(),
'',
false
);
return $this->getMockBuilder('Zend_Cache_Core')
->setMethods(array('load', 'save'))
->disableOriginalConstructor()
->getMock();
}
/**
@ -45,13 +42,10 @@ class ConfigManifestTest extends SapphireTest {
* @return SS_ConfigManifest
*/
protected function getManifestMock($methods) {
return $this->getMock(
'SS_ConfigManifest',
$methods,
array(), // no constructor arguments
'', // default
false // don't call the constructor
);
return $this->getMockBuilder('SS_ConfigManifest')
->setMethods($methods)
->disableOriginalConstructor()
->getMock();
}
/**

View File

@ -605,7 +605,7 @@ class InjectorTest extends SapphireTest {
'service' => array('factory' => 'factory', 'constructor' => array(1, 2, 3))
));
$factory = $this->getMock('SilverStripe\\Framework\\Injector\\Factory');
$factory = $this->getMockBuilder('SilverStripe\\Framework\\Injector\\Factory')->getMock();
$factory
->expects($this->once())
->method('create')

View File

@ -43,7 +43,7 @@ class PaginatedListTest extends SapphireTest {
}
public function testSetPaginationFromQuery() {
$query = $this->getMock('SQLQuery');
$query = $this->getMockBuilder('SQLQuery')->getMock();
$query->expects($this->once())
->method('getLimit')
->will($this->returnValue(array('limit' => 15, 'start' => 30)));

View File

@ -277,7 +277,9 @@ class ShortcodeParserTest extends SapphireTest {
}
public function testNoParseAttemptIfNoCode() {
$stub = $this->getMock('ShortcodeParser', array('replaceElementTagsWithMarkers'));
$stub = $this->getMockBuilder('ShortcodeParser')
->setMethods(array('replaceElementTagsWithMarkers'))
->getMock();
$stub->register('test', function() {
return '';
});

View File

@ -138,7 +138,9 @@ class SSViewerTest extends SapphireTest {
}
public function testRequirements() {
$requirements = $this->getMock("Requirements_Backend", array("javascript", "css"));
$requirements = $this->getMockBuilder("Requirements_Backend")
->setMethods(array("javascript", "css"))
->getMock();
$jsFile = FRAMEWORK_DIR . '/tests/forms/a.js';
$cssFile = FRAMEWORK_DIR . '/tests/forms/a.js';