Skip to content

Instantly share code, notes, and snippets.

@max107
Last active December 18, 2015 11:08
Show Gist options
  • Save max107/5773362 to your computer and use it in GitHub Desktop.
Save max107/5773362 to your computer and use it in GitHub Desktop.
<?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