mirror of
https://github.com/idanoo/php-resque.git
synced 2024-11-25 01:35:14 +00:00
idanoo
80d64e79ff
2.0.0 (2021-02-19) Moved to PSR-4 Namespaced codebase Added more comments throughout Co-Authored-By: idanoo <daniel@m2.nz> Co-Committed-By: idanoo <daniel@m2.nz>
36 lines
857 B
PHP
36 lines
857 B
PHP
<?php
|
|
|
|
namespace Resque\Test;
|
|
|
|
/**
|
|
* \Resque\Log tests.
|
|
*
|
|
* @package Resque/Tests
|
|
* @author Daniel Mason <daniel@m2.nz>
|
|
* @license http://www.opensource.org/licenses/mit-license.php
|
|
*/
|
|
|
|
class LogTest extends TestCase
|
|
{
|
|
public function testLogInterpolate()
|
|
{
|
|
$logger = new \Resque\Log();
|
|
$actual = $logger->interpolate('string {replace}', ['replace' => 'value']);
|
|
$expected = 'string value';
|
|
|
|
$this->assertEquals($expected, $actual);
|
|
}
|
|
|
|
public function testLogInterpolateMutiple()
|
|
{
|
|
$logger = new \Resque\Log();
|
|
$actual = $logger->interpolate(
|
|
'string {replace1} {replace2}',
|
|
['replace1' => 'value1', 'replace2' => 'value2']
|
|
);
|
|
$expected = 'string value1 value2';
|
|
|
|
$this->assertEquals($expected, $actual);
|
|
}
|
|
}
|