TestServiceCircuitLab.php
| 1 | <?php |
| 2 | /** |
| 3 | * TestServiceCircuitLab.php |
| 4 | * |
| 5 | * @package Tests |
| 6 | * @author Michael Pratt <pratt@hablarmierda.net> |
| 7 | * @link http://www.michael-pratt.com/ |
| 8 | * |
| 9 | * For the full copyright and license information, please view the LICENSE |
| 10 | * file that was distributed with this source code. |
| 11 | */ |
| 12 | |
| 13 | require_once 'TestProviders.php'; |
| 14 | |
| 15 | class TestServiceCircuitLab extends TestProviders |
| 16 | { |
| 17 | protected $urls = array( |
| 18 | 'valid' => array( |
| 19 | 'https://www.circuitlab.com/circuit/e38756/555-timer-as-astable-multivibrator-oscillator/', |
| 20 | 'https://www.circuitlab.com/circuit/fby849/bjt-cascoded-active-load-differential-amplifier-with-cmfb', |
| 21 | 'https://circuitlab.com/circuit/4da864/diode-half-wave-rectifier/', |
| 22 | 'https://circuitlab.com/circuit/z79rqm/leds-with-resistor-biasing', |
| 23 | 'https://www.circuitlab.com/circuit/42475b/mosfet-and-resistor-nand-gate/', |
| 24 | 'https://www.circuitlab.com/circuit/4da864/embed_target/?width=540', |
| 25 | 'https://circuitlab.com/cz79rqm/', |
| 26 | 'https://circuitlab.com/cz79rqm', |
| 27 | ), |
| 28 | 'invalid' => array( |
| 29 | 'https://www.circuitlab.com/', |
| 30 | 'https://www.circuitlab.com/forums/', |
| 31 | 'https://www.circuitlab.com/circuit/z79rqm/leds-with-resistor-biasing/other/stuff', |
| 32 | ), |
| 33 | 'normalize' => array( |
| 34 | 'https://circuitlab.com/circuit/4da864/diode-half-wave-rectifier/' => 'https://www.circuitlab.com/circuit/4da864/diode-half-wave-rectifier/', |
| 35 | 'https://circuitlab.com/circuit/z79rqm/leds-with-resistor-biasing' => 'https://www.circuitlab.com/circuit/z79rqm/leds-with-resistor-biasing', |
| 36 | 'https://circuitlab.com/cz79rqm' => 'https://www.circuitlab.com/circuit/z79rqm/', |
| 37 | 'https://circuitlab.com/cz79rqm/' => 'https://www.circuitlab.com/circuit/z79rqm/', |
| 38 | 'https://www.circuitlab.com/circuit/4da864/embed_target/?width=540' => 'https://www.circuitlab.com/circuit/4da864/embed_target/', |
| 39 | ), |
| 40 | 'fake' => array( |
| 41 | 'type' => 'rich', |
| 42 | 'html' => '<iframe' |
| 43 | ) |
| 44 | ); |
| 45 | |
| 46 | public function testProvider() { $this->validateProvider('CircuitLab'); } |
| 47 | } |
| 48 | ?> |
| 49 |