Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
50.00% |
2 / 4 |
CRAP | |
75.00% |
6 / 8 |
| MockDefinition | |
0.00% |
0 / 1 |
|
50.00% |
2 / 4 |
5.39 | |
75.00% |
6 / 8 |
| __construct(MockConfiguration $config, $code) | |
0.00% |
0 / 1 |
2.03 | |
80.00% |
4 / 5 |
|||
| getConfig() | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
| getClassName() | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
| getCode() | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
| <?php | |
| namespace Mockery\Generator; | |
| class MockDefinition | |
| { | |
| protected $config; | |
| protected $code; | |
| public function __construct(MockConfiguration $config, $code) | |
| { | |
| if (!$config->getName()) { | |
| throw new \InvalidArgumentException("MockConfiguration must contain a name"); | |
| } | |
| $this->config = $config; | |
| $this->code = $code; | |
| } | |
| public function getConfig() | |
| { | |
| return $this->config; | |
| } | |
| public function getClassName() | |
| { | |
| return $this->config->getName(); | |
| } | |
| public function getCode() | |
| { | |
| return $this->code; | |
| } | |
| } |