Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
kylekatarnls committed Sep 29, 2017
1 parent 0c57697 commit 229aef9
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions tests/Phug/PhugTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,23 +143,29 @@ public function testFilters()
self::assertFalse(Phug::hasFilter('Upper'));
self::assertFalse(array_key_exists('upper', Phug::getFilters()));
$message = null;

try {
Phug::setFilter('foo', 'bar');
} catch (PhugException $exception) {
$message = $exception->getMessage();
}
self::assertSame($message, 'Invalid foo filter given: it must be a callable or a class name.');
$message = null;

try {
Phug::replaceFilter('foo', function () {});
Phug::replaceFilter('foo', function () {
});
} catch (PhugException $exception) {
$message = $exception->getMessage();
}
self::assertSame($message, 'Filter foo is not set.');
Phug::addFilter('foo', function () {});
Phug::addFilter('foo', function () {
});
$message = null;

try {
Phug::addFilter('foo', function () {});
Phug::addFilter('foo', function () {
});
} catch (PhugException $exception) {
$message = $exception->getMessage();
}
Expand Down Expand Up @@ -208,23 +214,29 @@ public function testKeywords()
Phug::render('foo')
);
$message = null;

try {
Phug::setKeyword('foo', 'bar');
} catch (PhugException $exception) {
$message = $exception->getMessage();
}
self::assertSame($message, 'Invalid foo keyword given: it must be a callable or a class name.');
$message = null;

try {
Phug::replaceKeyword('foo', function () {});
Phug::replaceKeyword('foo', function () {
});
} catch (PhugException $exception) {
$message = $exception->getMessage();
}
self::assertSame($message, 'Keyword foo is not set.');
Phug::addKeyword('foo', function () {});
Phug::addKeyword('foo', function () {
});
$message = null;

try {
Phug::addKeyword('foo', function () {});
Phug::addKeyword('foo', function () {
});
} catch (PhugException $exception) {
$message = $exception->getMessage();
}
Expand Down

0 comments on commit 229aef9

Please sign in to comment.