Skip to content

Instantly share code, notes, and snippets.

View ThePixelDeveloper's full-sized avatar

Mathew Davies ThePixelDeveloper

View GitHub Profile
<?php
namespace Behat\Mink\Driver;
use Goutte\Client as GoutteClient,
Symfony\Component\BrowserKit\Client,
Symfony\Component\DomCrawler\Crawler,
Symfony\Component\DomCrawler\Field\ChoiceFormField;
use Behat\Mink\Session,
<?php
/*
* This file is part of the Behat\Mink.
* (c) Konstantin Kudryashov <ever.zet@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
1x time spiral (NM) - 20
4x gaea's cradle (NM) - 200
1x force of will (NM) - 55-60
1x chrome mox (GP foil) - 20
1x mirror universe (NM-) - 25
1x mirror universe (italian) - 15
4x berserk (1 beta NM, 1 beta MP, 2 UL NM) - 150
2x dark ritual (beta) - 30
4x wasteland (MP) - 120
1x candelabra (MP) - 200
/*
* jquery.uploadProgress
*
* Copyright (c) 2008 Piotr Sarnacki (drogomir.com)
* - Original release.
*
* Copyright (c) 2011 Mathew Davies (thepixeldeveloper@googlemail.com)
* - Refactored a lot of code into their own functions
*
* Licensed under the MIT license:
<?php defined('SYSPATH') or die('No direct script access.');
/**
* Tests the coaster download policy.
*
* @package Unittest
* @author Mathew Davies
*/
class Test_Coaster_Download_Policy extends Kohana_Unittest_TestCase
{
<?php
/**
* When given a coaster ID, this method will recalculate the number of downloads
* a coaster has had. The reason for manual queries is because it's around 300% faster than
* the current method.
*
* Use this function only when you want to bulk update a lot of coasters at the
* same time.
*
* @param type $id
<?php
/**
*
*/
public function get_ratings(Model_User $user)
{
$query = $this->reset()->select
(
'users.username',
<?php defined('SYSPATH') or die('No direct script access.');
class Model_Day extends ORM {
protected $_table_columns = array(
'day' => array('data_type' => 'date', 'is_nullable' => FALSE),
'max_events' => array('data_type' => 'int', 'is_nullable' => FALSE, 'default' => 10),
);
protected $_primary_key = 'day';
protected $_has_many = array(
'event_start_day' => array('model' => 'event', 'far_key' => 'starting_day'),
<phpunit colors="true" bootstrap="../../application/test_bootstrap.php">
<testsuites>
<testsuite name="Exchange">
<directory suffix=".php">tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">./classes/policy</directory>
</whitelist>
<?php
/**
* The directory in which your application specific resources are located.
* The application directory must contain the bootstrap.php file.
*
* @see http://kohanaframework.org/guide/about.install#application
*/
$application = '';
/**