Last active
December 18, 2015 11:08
-
-
Save max107/5773362 to your computer and use it in GitHub Desktop.
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 | |
/** | |
* Created by Studio107. | |
* Date: 13.06.13 | |
* Time: 16:31 | |
* All rights reserved. | |
*/ | |
/** | |
* Class Developer | |
*/ | |
abstract class Developer | |
{ | |
/** | |
* @return boolean | |
*/ | |
abstract public function mustKnowSeo(); | |
} | |
/** | |
* Class FrontendDeveloper. | |
* js, html, css, sass|scss, haml, twig, jquery, coffee script, etc... | |
*/ | |
class FrontendDeveloper extends Developer | |
{ | |
public function mustKnowSeo() | |
{ | |
return true; | |
} | |
} | |
/** | |
* Class BackendDeveloper | |
* python, php, mysql, pgsql, mongodb, redis, rabbitmq, etc... | |
*/ | |
class BackendDeveloper extends Developer | |
{ | |
public function mustKnowSeo() | |
{ | |
return false; | |
} | |
} | |
/** | |
* Class SeoBeginner | |
* Unit test | |
*/ | |
class SeoBeginner extends PHPUnit_Framework_TestCase | |
{ | |
public function testDevelopers() | |
{ | |
$fr = new FrontendDeveloper(); | |
$this->assertTrue($fr->mustKnowSeo()); | |
$bk = new BackendDeveloper(); | |
$this->assertFalse($bk->mustKnowSeo()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment