PHPUnit Boilerplate

Hits: 112

Of course first  phpunit/phpunit to be installed. I think, local installation much better.

composer require --dev phpunit/phpunit ^7

# phpunit.xml

<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
        <testsuite name="Unit">
            <directory suffix="Test.php">./tests</directory>
        <whitelist processUncoveredFilesFromWhitelist="true">
            <directory suffix=".php">./src</directory>

# ExampleTest.php, this file must be under tests folder.


namespace yourvendorname\yourpackagename;
use PHPUnit\Framework\TestCase;

 * Description of ExampleTest
 * @author Koray Zorluoglu <>
class ExampleTest extends TestCase

    public function testExampleMethod()
        $count = 0;
        $this->assertSame(0, $count);


# Run on Command prompt.


# Example Output

$ ./vendor/bin/phpunit
PHPUnit 7.4.5 by Sebastian Bergmann and contributors.

....                                                                4 / 4 (100%)

Time: 968 ms, Memory: 4.00MB

OK (4 tests, 4 assertions)


Social Poster – A Simple Facebook Page and Twitter poster

Hits: 181

Social (Media) Poster

Social Poster is a simple Facebook Page and Twitt poster

  • Text Posting
  • Text with Image-\s Posting


Social Poster uses a number of open source projects to work properly:

  • facebook/graph-sdk – Facebook SDK for PHP (v5)
  • dg/twitter-php – Twitter for PHP is a very small and easy-to-use library for sending messages to Twitter and receiving status updates.
  • – Markdown editor for this creating/editing. Fast and easy to extend.
  • Twitter Bootstrap – great UI boilerplate for modern web apps
  • jQuery – duh



  • Create Facebook Developer Account
  • Create Simple App
    • You not need Facebook Products other anything under Your App Settings, I have only Contact E-mail filled
    • Call
    • Select Your App under Application Select
    • Select Page Access Token under Get Token Button
    • Click i icon after Access Token Creating
    • Click Open in Access Token Tool from opened Internal Popup
    • Click Generate Long Lived Token


  • Create Twitter Developer Account
  • Create Simple App
    • Click App Details
    • This Keys will be located under Keys and tokens Menu