This repository has been archived by the owner on Jan 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/2927' into develop
- Loading branch information
65 parents
86d3ae8
+
9c474de
+
1a75c72
+
47d1cd2
+
de058f6
+
67b97f6
+
40d86d0
+
b5234cc
+
17b4e13
+
8af24aa
+
1a9df55
+
2c85c99
+
5557fac
+
fe78a35
+
f6430c3
+
6041a1e
+
86b9031
+
674bd75
+
67a1bfb
+
4d4dd8b
+
c655082
+
dbb18b2
+
97a9134
+
80367df
+
98d5255
+
7946c9f
+
ea67c13
+
44df0b2
+
38e090d
+
7af74e7
+
8b311b1
+
e2c2b94
+
51601cb
+
dcc1eaf
+
6f4b805
+
a30a64f
+
ee7347d
+
8b04bfe
+
b487f00
+
ecdfdf6
+
d8cde75
+
b7a33bb
+
65ecb58
+
571d938
+
625a786
+
6fe4efc
+
f94838d
+
76607e3
+
492076c
+
17b56b8
+
c5509fe
+
e0fa433
+
7d74e99
+
309136e
+
f1dd38a
+
7be533f
+
6a618c2
+
3a454e3
+
f66ca80
+
f1bebf2
+
850249d
+
de3fd70
+
398a3c4
+
5c56554
+
71c1497
commit 5576455
Showing
2 changed files
with
71 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
/** | ||
* Zend Framework (http://framework.zend.com/) | ||
* | ||
* @link http://github.com/zendframework/zf2 for the canonical source repository | ||
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
* @package Zend_Log | ||
*/ | ||
|
||
namespace Zend\Log; | ||
|
||
use Zend\Log\LoggerInterface; | ||
|
||
/** | ||
* @category Zend | ||
* @package Zend_Log | ||
*/ | ||
trait LoggerAwareTrait | ||
{ | ||
/** | ||
* @var LoggerInterface | ||
*/ | ||
protected $logger = null; | ||
|
||
/** | ||
* Set logger object | ||
* | ||
* @param LoggerInterface $logger | ||
* @return mixed | ||
*/ | ||
public function setLogger(LoggerInterface $logger) | ||
{ | ||
$this->logger = $logger; | ||
|
||
return $this; | ||
} | ||
} |
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,33 @@ | ||
<?php | ||
/** | ||
* Zend Framework (http://framework.zend.com/) | ||
* | ||
* @link http://github.com/zendframework/zf2 for the canonical source repository | ||
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
* @package Zend_Log | ||
*/ | ||
|
||
namespace ZendTest\Log; | ||
|
||
use \PHPUnit_Framework_TestCase as TestCase; | ||
use \Zend\Log\Logger; | ||
|
||
/** | ||
* @requires PHP 5.4 | ||
*/ | ||
class LoggerAwareTraitTest extends TestCase | ||
{ | ||
public function testSetLogger() | ||
{ | ||
$object = $this->getObjectForTrait('\Zend\Log\LoggerAwareTrait'); | ||
|
||
$this->assertAttributeEquals(null, 'logger', $object); | ||
|
||
$logger = new Logger; | ||
|
||
$object->setLogger($logger); | ||
|
||
$this->assertAttributeEquals($logger, 'logger', $object); | ||
} | ||
} |