aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-Sheng, Li <peter279k@gmail.com>2021-01-06 03:07:33 +0300
committerGitHub <noreply@github.com>2021-01-06 03:07:33 +0300
commit936ee5caca3067de98a40d5a5788946b6f2b87dc (patch)
tree27c3fe26e4ac03214db12e8a6d2682ea3e3be00b
parent2f043ba2b2008bf32bf09f0b6af4f30f097a8bd6 (diff)
Improve autoloading, asssertions and CI trigger (#79)V2.1.6
-rw-r--r--composer.json9
-rw-r--r--tests/MathTest.php2
2 files changed, 8 insertions, 3 deletions
diff --git a/composer.json b/composer.json
index 3024ee7..6c2dd75 100644
--- a/composer.json
+++ b/composer.json
@@ -29,8 +29,13 @@
"phpunit/phpunit": ">=8.0"
},
"autoload": {
- "psr-0": {
- "NXP": "src/"
+ "psr-4": {
+ "NXP\\": "src/NXP"
+ }
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "NXP\\Tests\\": "tests/"
}
}
}
diff --git a/tests/MathTest.php b/tests/MathTest.php
index a5061ad..47d89b8 100644
--- a/tests/MathTest.php
+++ b/tests/MathTest.php
@@ -504,7 +504,7 @@ class MathTest extends TestCase
$calculator->setVar('null', null);
$calculator->setVar('float', 1.1);
$calculator->setVar('string', 'string');
- $this->assertEquals(8, count($calculator->getVars()));
+ $this->assertCount(8, $calculator->getVars());
$this->assertEquals(true, $calculator->getVar('boolTrue'));
$this->assertEquals(false, $calculator->getVar('boolFalse'));
$this->assertEquals(1, $calculator->getVar('int'));