Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Commit

Permalink
Clean up duplicate tests in Log\SimpleFormatter
Browse files Browse the repository at this point in the history
All variable types are already tested since SimpleFormatter extends BaseFormatter.
  • Loading branch information
b-durand committed Aug 29, 2012
1 parent 284ed37 commit 1b75f89
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions tests/ZendTest/Log/Formatter/SimpleTest.php
Expand Up @@ -47,39 +47,6 @@ public function testDefaultFormat()
$this->assertEquals($outputExpected, $formatter->format($fields));
}

/**
* @dataProvider provideMessages
*/
public function testComplexMessages($message, $printExpected)
{
$fields = array(
'timestamp' => new DateTime(),
'priority' => 42,
'priorityName' => 'bar',
'extra' => array()
);

$formatter = new Simple();

$fields['message'] = $message;
$line = $formatter->format($fields);
$this->assertContains($printExpected, $line);
}

public function provideMessages()
{
return array(
array('Foo', 'Foo'),
array(10, '10'),
array(10.5, '10.5'),
array(true, '1'),
array(fopen('php://stdout', 'w'), 'resource(stream)'),
array(range(1, 10), '[1,2,3,4,5,6,7,8,9,10]'),
array(new StringObject(), 'Hello World'),
array(new stdClass(), 'object'),
);
}

/**
* @dataProvider provideDateTimeFormats
*/
Expand Down

0 comments on commit 1b75f89

Please sign in to comment.