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

Commit

Permalink
Browse files Browse the repository at this point in the history
- Base formatter was calling a method on itself using self::methodName()
  notation; changing this to "static" raised an issue, as the method is
  non-static.
- Two tests were essentially testing whether typehinting would correctly
  prevent non-formatter arguments. These tests were (a) unnecessary, and
  (b) did not work on all versions of PHP. Removed.
  • Loading branch information
weierophinney committed Nov 16, 2012
1 parent b339cf4 commit d39c531
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 20 deletions.
2 changes: 1 addition & 1 deletion src/Formatter/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function format($event)
foreach ($event as $key => $value) {
// Keep extra as an array
if ('extra' === $key) {
$event[$key] = static::format($value);
$event[$key] = self::format($value);
} else {
$event[$key] = $this->normalize($value);
}
Expand Down
10 changes: 0 additions & 10 deletions test/Writer/AbstractTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,6 @@ protected function setUp()
$this->_writer = new ConcreteWriter();
}

/**
* @group ZF-6085
*/
public function testSetFormatter()
{
$this->_writer->setFormatter(new SimpleFormatter());
$this->setExpectedException('PHPUnit_Framework_Error');
$this->_writer->setFormatter(new \StdClass());
}

public function testAddFilter()
{
$this->_writer->addFilter(1);
Expand Down
9 changes: 0 additions & 9 deletions test/Writer/DbTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,6 @@ public function testShutdownRemovesReferenceToDatabaseInstance()
$this->writer->write(array('message' => 'this should fail'));
}

/**
* @group ZF-10089
*/
public function testThrowStrictSetFormatter()
{
$this->setExpectedException('PHPUnit_Framework_Error');
$this->writer->setFormatter(new \StdClass());
}

public function testWriteDateTimeAsTimestamp()
{
$date = new DateTime();
Expand Down

0 comments on commit d39c531

Please sign in to comment.