Created
March 29, 2018 10:40
-
-
Save ahmed-abid/7db923cb3be835dbb16b788287492ada to your computer and use it in GitHub Desktop.
test No Dependency Injection Needed
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
<?php | |
/** no dependency injection example */ | |
public function testNoDependencyInjectionNeeded(){ | |
$object = new NoDependencyInjectionNeeded(); | |
$original = $object->getName(); | |
$this->assertEquals('users — No Dependency Injection Needed', $original); | |
Moke::double('App\AspectMock\UserModel', ['tableName' => 'my_users']); | |
$mokedName = $object->getName(); | |
$this->assertEquals('my_users — No Dependency Injection Needed', $mokedName); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment