Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test enhancement #126

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ php:
- 7.1
- 7.2
- 7.3
- 7.4

cache:
directories:
- $HOME/.composer/cache

install:
- travis_retry composer update --no-interaction --no-progress --no-suggest --prefer-dist
- travis_retry composer install --no-interaction --no-progress --no-suggest --prefer-dist

script:
- vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"php": ">=5.5.9"
},
"require-dev": {
"phpunit/phpunit": "~4.8 || ~5.7 || ~6.5 || ~7.5",
"phpunit/phpunit": "~4.8.36 || ~5.7 || ~6.5 || ~7.5",
"scrutinizer/ocular": "~1.1",
"squizlabs/php_codesniffer": "~2.2",
"symfony/yaml": "~3.4"
Expand Down
6 changes: 3 additions & 3 deletions tests/AbstractConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public function testSetArray()
'host' => 'localhost',
'name' => 'mydatabase'
]);
$this->assertTrue(is_array($this->config->get('database')));
$this->assertInternalType('array', $this->config->get('database'));
$this->assertEquals('localhost', $this->config->get('database.host'));
}

Expand All @@ -161,7 +161,7 @@ public function testCacheWithNestedArray()
'host' => 'localhost',
'name' => 'mydatabase'
]);
$this->assertTrue(is_array($this->config->get('database')));
$this->assertInternalType('array', $this->config->get('database'));
$this->config->set('database.host', '127.0.0.1');
$expected = [
'host' => '127.0.0.1',
Expand Down Expand Up @@ -227,7 +227,7 @@ public function testSetAndUnsetArray()
'host' => 'localhost',
'name' => 'mydatabase'
]);
$this->assertTrue(is_array($this->config->get('database')));
$this->assertInternalType('array', $this->config->get('database'));
$this->assertEquals('localhost', $this->config->get('database.host'));
$this->config->set('database.host', null);
$this->assertNull($this->config->get('database.host'));
Expand Down
2 changes: 1 addition & 1 deletion tests/Writer/IniTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function testWriteIni()
$this->writer->toFile($this->data, $this->temp_file);

$this->assertFileExists($this->temp_file);
$this->assertEquals(file_get_contents($this->temp_file), file_get_contents(__DIR__.'/../mocks/pass/config4.ini'));
$this->assertFileEquals($this->temp_file, __DIR__.'/../mocks/pass/config4.ini');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/Writer/JsonTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function testWriteJson()
$this->writer->toFile($this->data, $this->temp_file);

$this->assertFileExists($this->temp_file);
$this->assertEquals(file_get_contents($this->temp_file), file_get_contents(__DIR__.'/../mocks/pass/config4.json'));
$this->assertFileEquals($this->temp_file, __DIR__.'/../mocks/pass/config4.json');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/Writer/XmlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function testWriteXml()
$this->writer->toFile($this->data, $this->temp_file);

$this->assertFileExists($this->temp_file);
$this->assertEquals(file_get_contents($this->temp_file), file_get_contents(__DIR__.'/../mocks/pass/config4.xml'));
$this->assertFileEquals($this->temp_file, __DIR__.'/../mocks/pass/config4.xml');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/Writer/YamlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function testWriteYaml()
{
$this->writer->toFile($this->data, $this->temp_file);
$this->assertFileExists($this->temp_file);
$this->assertEquals(file_get_contents($this->temp_file), file_get_contents(__DIR__.'/../mocks/pass/config4.yaml'));
$this->assertFileEquals($this->temp_file, __DIR__.'/../mocks/pass/config4.yaml');
}

/**
Expand Down