-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(test): implement base of ci with test
- Loading branch information
1 parent
4db7576
commit 2de2597
Showing
5 changed files
with
82 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ public/index.php | |
composer.lock | ||
.DS_Store | ||
.thumbs | ||
.phpunit.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
|
||
namespace Studit\H5PBundle\Tests\Event; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
use Studit\H5PBundle\Event\LibraryFileEvent; | ||
|
||
class LibraryFileEventTest extends TestCase | ||
{ | ||
public function testGetFiles() | ||
{ | ||
// Arrange | ||
$files = ['file1.js', 'file2.css']; | ||
$libraryList = ['library1', 'library2']; | ||
$mode = 'production'; | ||
|
||
// Act | ||
$event = new LibraryFileEvent($files, $libraryList, $mode); | ||
|
||
// Assert | ||
$this->assertSame($files, $event->getFiles()); | ||
} | ||
|
||
public function testGetLibraryList() | ||
{ | ||
// Arrange | ||
$files = ['file1.js', 'file2.css']; | ||
$libraryList = ['library1', 'library2']; | ||
$mode = 'production'; | ||
|
||
// Act | ||
$event = new LibraryFileEvent($files, $libraryList, $mode); | ||
|
||
// Assert | ||
$this->assertSame($libraryList, $event->getLibraryList()); | ||
} | ||
|
||
public function testGetMode() | ||
{ | ||
// Arrange | ||
$files = ['file1.js', 'file2.css']; | ||
$libraryList = ['library1', 'library2']; | ||
$mode = 'production'; | ||
|
||
// Act | ||
$event = new LibraryFileEvent($files, $libraryList, $mode); | ||
|
||
// Assert | ||
$this->assertSame($mode, $event->getMode()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd" | ||
bootstrap="vendor/autoload.php" | ||
cacheDirectory=".phpunit.cache" | ||
executionOrder="depends,defects" | ||
shortenArraysForExportThreshold="10" | ||
requireCoverageMetadata="false" | ||
beStrictAboutCoverageMetadata="true" | ||
beStrictAboutOutputDuringTests="true" | ||
displayDetailsOnPhpunitDeprecations="true" | ||
failOnPhpunitDeprecation="true" | ||
failOnRisky="true" | ||
failOnWarning="true"> | ||
<testsuites> | ||
<testsuite name="default"> | ||
<directory>Tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
<source ignoreIndirectDeprecations="true" restrictNotices="true" restrictWarnings="true"> | ||
<include> | ||
<directory>.</directory> | ||
</include> | ||
</source> | ||
</phpunit> |