<commit_before><?php

namespace SocialMedia\tests;

// required to load
require_once __DIR__ . '/../vendor/autoload.php';

/*
 * This file is part of the Social Pushing from <NAME>.
 *
 * For the full copyright and license information, please view the license
 * file that was distributed with this source code.
 */

use SocialMedia\SocialMedia;
use SocialMedia\Exception;

/**
 * Social Media Class which contains everything to (un)publish
 * to the timeline or connect to social media.
 *
 * @author <NAME> <<EMAIL>>
 */
class SocialMediaTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @return SocialMedia
     */
    public function testEmpty()
    {
        return new SocialMedia();
    }

    /**
     * @expectedException Exception
     */
    public function testException()
    {
        throw new Exception('error');
    }
}<commit_msg>SocialMediaTest updated<commit_after><?php

namespace SocialMedia\tests;

// required to load
require_once __DIR__ . '/../vendor/autoload.php';

/*
 * This file is part of the Social Pushing from <NAME>.
 *
 * For the full copyright and license information, please view the license
 * file that was distributed with this source code.
 */

use SocialMedia\SocialMedia;
use SocialMedia\Exception;
use SocialMedia\Objects\Post;
use SocialMedia\Objects\Service;

/**
 * Social Media Class which contains everything to (un)publish
 * to the timeline or connect to social media.
 *
 * @author <NAME> <<EMAIL>>
 */
class SocialMediaTest extends \PHPUnit_Framework_TestCase
{
    protected static $api;

    /**
     * @return SocialMedia
     */
    public static function setUpBeforeClass()
    {
        self::$api = new SocialMedia();
    }

    public function testPublish()
    {
        // define external post objects
        $service = new Service();
        $post = new Post();
        
        // (un)publish a message
        $api->timeline->publish($service, $post);
    }

    /**
     * @expectedException Exception
     */
    public function testException()
    {
        throw new Exception('error');
    }
}
{'fraction_non_alphanumeric': 0.1055930568948891, 'fraction_numerical': 0.0, 'mean_word_length': 2.8425925925925926, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5078076', 'n_tokens_mistral': 567, 'n_tokens_neox': 559, 'n_words': 189}