mirror of
https://github.com/ivuorinen/palette.git
synced 2026-03-09 18:00:23 +00:00
First tests
This commit is contained in:
@@ -21,5 +21,8 @@
|
|||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.2.0"
|
"php": ">=5.2.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "~6.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
1469
composer.lock
generated
Normal file
1469
composer.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
25
phpunit.xml
Normal file
25
phpunit.xml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<phpunit backupGlobals="false"
|
||||||
|
backupStaticAttributes="false"
|
||||||
|
colors="true"
|
||||||
|
convertErrorsToExceptions="true"
|
||||||
|
convertNoticesToExceptions="true"
|
||||||
|
convertWarningsToExceptions="true"
|
||||||
|
processIsolation="false"
|
||||||
|
stopOnFailure="false"
|
||||||
|
syntaxCheck="false"
|
||||||
|
bootstrap="vendor/autoload.php"
|
||||||
|
>
|
||||||
|
<testsuites>
|
||||||
|
<testsuite name="Test Suite">
|
||||||
|
<directory>./tests/</directory>
|
||||||
|
</testsuite>
|
||||||
|
</testsuites>
|
||||||
|
|
||||||
|
<filter>
|
||||||
|
<whitelist>
|
||||||
|
<directory>./src/</directory>
|
||||||
|
</whitelist>
|
||||||
|
</filter>
|
||||||
|
</phpunit>
|
||||||
18
tests/PaletteTests.php
Normal file
18
tests/PaletteTests.php
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
class PaletteTests extends \PHPUnit_Framework_TestCase
|
||||||
|
{
|
||||||
|
public $palette;
|
||||||
|
|
||||||
|
public function test_class_is_found_and_has_default_attributes()
|
||||||
|
{
|
||||||
|
$this->palette = new \ivuorinen\Palette\Palette();
|
||||||
|
$this->assertInstanceOf('ivuorinen\Palette\Palette', $this->palette);
|
||||||
|
|
||||||
|
$this->assertInternalType('integer', $this->palette->precision);
|
||||||
|
$this->assertInternalType('integer', $this->palette->returnColors);
|
||||||
|
$this->assertInternalType('array', $this->palette->colorsArray);
|
||||||
|
$this->assertInternalType('null', $this->palette->filename);
|
||||||
|
$this->assertInternalType('string', $this->palette->destination);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user