mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Fix unit tests to accommodate change to trusty in Travis CI
This commit is contained in:
parent
429acbae11
commit
e734caf7b3
2 changed files with 20 additions and 15 deletions
30
.travis.yml
30
.travis.yml
|
|
@ -1,19 +1,23 @@
|
|||
distro: trusty
|
||||
sudo: false
|
||||
language: php
|
||||
php:
|
||||
- 5.5
|
||||
- 5.6
|
||||
- 7.0
|
||||
- 7.1
|
||||
sudo: false
|
||||
- 5.5
|
||||
- 5.6
|
||||
- 7.0
|
||||
- 7.1
|
||||
services:
|
||||
- mysql
|
||||
before_script:
|
||||
- npm install grunt grunt-cli grunt-contrib-jshint grunt-contrib-csslint grunt-phplint --save-dev
|
||||
- mysql -u root -e "CREATE DATABASE rhymix"
|
||||
- mysql -u root -e "SET PASSWORD FOR 'travis'@'localhost' = PASSWORD('travis')"
|
||||
- php -S localhost:8000 &
|
||||
- wget http://codeception.com/releases/2.1.11/codecept.phar
|
||||
- npm install grunt grunt-cli grunt-contrib-jshint grunt-contrib-csslint grunt-phplint --save-dev
|
||||
- mysql -u root -e "CREATE DATABASE rhymix CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci"
|
||||
- mysql -u root -e "GRANT ALL PRIVILEGES ON rhymix.* TO travis"
|
||||
- mysql -u root -e "SET PASSWORD FOR travis = PASSWORD('travis')"
|
||||
- php -S localhost:8000 &
|
||||
- wget http://codeception.com/releases/2.1.11/codecept.phar
|
||||
script:
|
||||
- php codecept.phar build
|
||||
- php codecept.phar run -d --fail-fast --env travis
|
||||
- grunt lint
|
||||
- php codecept.phar build
|
||||
- php codecept.phar run -d --fail-fast --env travis
|
||||
- grunt lint
|
||||
notifications:
|
||||
email: false
|
||||
|
|
|
|||
|
|
@ -293,7 +293,7 @@ class StorageTest extends \Codeception\TestCase\Test
|
|||
$this->assertEquals(array('bar', 'baz', 'foo', 'subdir'), Rhymix\Framework\Storage::readDirectory($testdir, false, true, false));
|
||||
$this->assertEquals(array('.dotfile', 'bar', 'baz', 'foo'), Rhymix\Framework\Storage::readDirectory($testdir, false, false, true));
|
||||
$this->assertEquals(array('.dotfile', 'bar', 'baz', 'foo', 'subdir'), Rhymix\Framework\Storage::readDirectory($testdir, false, false, false));
|
||||
$this->assertFalse(Rhymix\Framework\Storage::readDirectory('/opt/nonexistent.foobar'));
|
||||
$this->assertFalse(Rhymix\Framework\Storage::readDirectory('/opt/nonexistent/foobar'));
|
||||
}
|
||||
|
||||
public function testCopyDirectory()
|
||||
|
|
@ -308,7 +308,8 @@ class StorageTest extends \Codeception\TestCase\Test
|
|||
$this->assertTrue(Rhymix\Framework\Storage::copyDirectory($sourcedir, $targetdir));
|
||||
$this->assertTrue(file_exists($targetdir . '/bar'));
|
||||
$this->assertTrue(file_exists($targetdir . '/subdir/baz'));
|
||||
$this->assertFalse(@Rhymix\Framework\Storage::copyDirectory($sourcedir, '/opt/nonexistent.foobar'));
|
||||
if (is_writable('/opt')) @touch('/opt/nonexistent');
|
||||
$this->assertFalse(@Rhymix\Framework\Storage::copyDirectory($sourcedir, '/opt/nonexistent/foobar'));
|
||||
}
|
||||
|
||||
public function testMoveDirectory()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue