<commit_before><?php
namespace Rocketeer\Tests\Tasks;

use Rocketeer\Tests\TestCases\RocketeerTestCase;

class UpdateTest extends RocketeerTestCase
{
	public function testCanUpdateRepository()
	{
		$task = $this->pretendTask('Update', array(
			'migrate' => true,
			'seed'    => true
		));

		$php     = exec('which php');
		$matcher = array(
		  array(
		    "cd " .$this->server. "/releases/20000000000000",
		    "git reset --hard",
		    "git pull"
		  ),
		  "mkdir -p " .$this->server. "/shared/tests",
		  "mv " .$this->server. "/releases/20000000000000/tests/Elements " .$this->server. "/shared/tests/Elements",
		  array(
		    "cd " .$this->server. "/releases/20000000000000",
		    "chmod -R 755 " .$this->server. "/releases/20000000000000/tests",
		    "chmod -R g+s " .$this->server. "/releases/20000000000000/tests",
		    "chown -R www-data:www-data " .$this->server. "/releases/20000000000000/tests"
		  ),
		  array(
		    "cd " .$this->server. "/releases/20000000000000",
		    "/usr/local/bin/php artisan migrate --seed"
		  ),
		  array(
		    "cd " .$this->server. "/releases/20000000000000",
		    "/usr/local/bin/php artisan cache:clear"
		  )
		);

		$this->assertTaskHistory($task, $matcher);
	}
}<commit_msg>Fix path to PHP in tests<commit_after><?php
namespace Rocketeer\Tests\Tasks;

use Rocketeer\Tests\TestCases\RocketeerTestCase;

class UpdateTest extends RocketeerTestCase
{
	public function testCanUpdateRepository()
	{
		$task = $this->pretendTask('Update', array(
			'migrate' => true,
			'seed'    => true
		));

		$php     = exec('which php');
		$matcher = array(
			array(
				"cd " .$this->server. "/releases/20000000000000",
				"git reset --hard",
				"git pull"
			),
			"mkdir -p " .$this->server. "/shared/tests",
			"mv " .$this->server. "/releases/20000000000000/tests/Elements " .$this->server. "/shared/tests/Elements",
			array(
				"cd " .$this->server. "/releases/20000000000000",
				"chmod -R 755 " .$this->server. "/releases/20000000000000/tests",
				"chmod -R g+s " .$this->server. "/releases/20000000000000/tests",
				"chown -R www-data:www-data " .$this->server. "/releases/20000000000000/tests"
			),
			array(
				"cd " .$this->server. "/releases/20000000000000",
				$php. " artisan migrate --seed"
			),
			array(
				"cd " .$this->server. "/releases/20000000000000",
				$php. " artisan cache:clear"
			)
		);

		$this->assertTaskHistory($task, $matcher);
	}
}
{'fraction_non_alphanumeric': 0.18309278350515465, 'fraction_numerical': 0.09484536082474226, 'mean_word_length': 2.9640522875816995, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 16, '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': '2237171', 'n_tokens_mistral': 1175, 'n_tokens_neox': 836, 'n_words': 161}