Introduce Queue

master
Peter Babič 8 years ago
parent 5d7c8c4ce7
commit 525ad4fcc2
Signed by: peter.babic
GPG Key ID: 4BB075BC1884BA40
  1. 230
      .idea/workspace.xml
  2. 30
      src/Coffee/Queue.php
  3. 18
      tests/Coffee/QueueTest.php

@ -5,12 +5,9 @@
</component>
<component name="ChangeListManager">
<list default="true" id="65f95bb6-3a86-4ed6-841e-441936291ad4" name="Default" comment="Rework Spot number">
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/Coffee/Queue.php" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/tests/Coffee/QueueTest.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/index.php" afterPath="$PROJECT_DIR$/index.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Coffee/Map.php" afterPath="$PROJECT_DIR$/src/Coffee/Map.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Coffee/Spot.php" afterPath="$PROJECT_DIR$/src/Coffee/Spot.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Coffee/Tile.php" afterPath="$PROJECT_DIR$/src/Coffee/Tile.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/tests/Coffee/TileTest.php" afterPath="$PROJECT_DIR$/tests/Coffee/TileTest.php" />
</list>
<ignored path="coffeetable.iws" />
<ignored path=".idea/workspace.xml" />
@ -39,7 +36,7 @@
<file leaf-file-name="index.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/index.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="334">
<state relative-caret-position="1224">
<caret line="68" column="17" selection-start-line="68" selection-start-column="17" selection-end-line="68" selection-end-column="17" />
<folding />
</state>
@ -56,11 +53,11 @@
</provider>
</entry>
</file>
<file leaf-file-name="TileTest.php" pinned="false" current-in-tab="true">
<file leaf-file-name="TileTest.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/tests/Coffee/TileTest.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="370">
<caret line="26" column="5" selection-start-line="26" selection-start-column="5" selection-end-line="26" selection-end-column="5" />
<state relative-caret-position="108">
<caret line="6" column="0" selection-start-line="4" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
<folding />
</state>
</provider>
@ -69,7 +66,7 @@
<file leaf-file-name="SpotTest.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/tests/Coffee/SpotTest.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="295">
<state relative-caret-position="504">
<caret line="28" column="15" selection-start-line="28" selection-start-column="15" selection-end-line="28" selection-end-column="15" />
<folding />
</state>
@ -79,7 +76,7 @@
<file leaf-file-name="Spot.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Coffee/Spot.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="181">
<state relative-caret-position="450">
<caret line="30" column="19" selection-start-line="30" selection-start-column="19" selection-end-line="30" selection-end-column="19" />
<folding />
</state>
@ -89,7 +86,7 @@
<file leaf-file-name="TableTest.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/tests/Coffee/TableTest.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="161">
<state relative-caret-position="1728">
<caret line="96" column="22" selection-start-line="96" selection-start-column="22" selection-end-line="96" selection-end-column="22" />
<folding />
</state>
@ -99,8 +96,28 @@
<file leaf-file-name="Table.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Coffee/Table.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="323">
<caret line="81" column="23" selection-start-line="81" selection-start-column="23" selection-end-line="81" selection-end-column="23" />
<state relative-caret-position="316">
<caret line="111" column="33" selection-start-line="111" selection-start-column="33" selection-end-line="111" selection-end-column="33" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Queue.php" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/Coffee/Queue.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
<caret line="5" column="14" selection-start-line="5" selection-start-column="14" selection-end-line="5" selection-end-column="14" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="QueueTest.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/tests/Coffee/QueueTest.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="234">
<caret line="13" column="26" selection-start-line="13" selection-start-column="26" selection-end-line="13" selection-end-column="26" />
<folding />
</state>
</provider>
@ -109,8 +126,8 @@
<file leaf-file-name="Tile.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Coffee/Tile.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="666">
<caret line="38" column="16" selection-start-line="38" selection-start-column="16" selection-end-line="38" selection-end-column="16" />
<state relative-caret-position="288">
<caret line="38" column="25" selection-start-line="38" selection-start-column="25" selection-end-line="38" selection-end-column="25" />
<folding />
</state>
</provider>
@ -168,14 +185,18 @@
<option value="/usr/share/nginx/html/coffeetable/tests/Coffee/TileTest.php" />
<option value="/usr/share/nginx/html/coffeetable/src/Coffee/Table.php" />
<option value="$PROJECT_DIR$/tests/Coffee/SpotTest.php" />
<option value="$PROJECT_DIR$/src/Coffee/Table.php" />
<option value="$PROJECT_DIR$/src/Coffee/Position.php" />
<option value="$PROJECT_DIR$/tests/Coffee/TableTest.php" />
<option value="$PROJECT_DIR$/src/Coffee/Tile.php" />
<option value="$PROJECT_DIR$/src/Coffee/Spot.php" />
<option value="$PROJECT_DIR$/index.php" />
<option value="$PROJECT_DIR$/src/Coffee/Map.php" />
<option value="$PROJECT_DIR$/tests/Coffee/TileTest.php" />
<option value="$PROJECT_DIR$/src/Coffee/Tile.php" />
<option value="$PROJECT_DIR$/src/Coffee/Table.php" />
<option value="$PROJECT_DIR$/src/Coffee/Stack.php" />
<option value="$PROJECT_DIR$/tests/Coffee/StackTest.php" />
<option value="$PROJECT_DIR$/tests/Coffee/QueueTest.php" />
<option value="$PROJECT_DIR$/src/Coffee/Queue.php" />
</list>
</option>
</component>
@ -219,10 +240,8 @@
</include_path>
</component>
<component name="ProjectFrameBounds">
<option name="x" value="-2" />
<option name="y" value="-26" />
<option name="width" value="1444" />
<option name="height" value="899" />
<option name="width" value="1440" />
<option name="height" value="871" />
</component>
<component name="ProjectInspectionProfilesVisibleTreeState">
<entry key="Project Default">
@ -326,6 +345,52 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="coffeetable" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="coffeetable" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="coffeetable" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="coffeetable" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="tests" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="Coffee" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="coffeetable" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="coffeetable" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="src" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="Coffee" />
<option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
</panes>
@ -434,14 +499,8 @@
<workItem from="1458583053423" duration="2549000" />
<workItem from="1458671080272" duration="2309000" />
<workItem from="1458673405558" duration="654000" />
<workItem from="1458674128734" duration="1508000" />
</task>
<task id="LOCAL-00002" summary="Refactor coordinates in Tile from X,Y to col,row">
<created>1458140295782</created>
<option name="number" value="00002" />
<option name="presentableId" value="LOCAL-00002" />
<option name="project" value="LOCAL" />
<updated>1458140295782</updated>
<workItem from="1458674128734" duration="1662000" />
<workItem from="1458713666152" duration="1694000" />
</task>
<task id="LOCAL-00003" summary="Refactor Table.isValidFortile to couldContainTile">
<created>1458141252466</created>
@ -779,16 +838,17 @@
<option name="project" value="LOCAL" />
<updated>1458586130407</updated>
</task>
<option name="localTasksCounter" value="51" />
<task id="LOCAL-00051" summary="Rework Spot number">
<created>1458675641510</created>
<option name="number" value="00051" />
<option name="presentableId" value="LOCAL-00051" />
<option name="project" value="LOCAL" />
<updated>1458675641510</updated>
</task>
<option name="localTasksCounter" value="52" />
<servers />
</component>
<component name="TestHistory">
<history-entry file="Tests - 2016.03.22 at 19h 57m 49s.xml">
<configuration name="Tests" configurationId="PHPUnitRunConfigurationType" />
</history-entry>
<history-entry file="Tests - 2016.03.22 at 19h 59m 01s.xml">
<configuration name="Tests" configurationId="PHPUnitRunConfigurationType" />
</history-entry>
<history-entry file="Tests - 2016.03.22 at 20h 00m 33s.xml">
<configuration name="Tests" configurationId="PHPUnitRunConfigurationType" />
</history-entry>
@ -813,9 +873,15 @@
<history-entry file="Tests - 2016.03.22 at 20h 40m 10s.xml">
<configuration name="Tests" configurationId="PHPUnitRunConfigurationType" />
</history-entry>
<history-entry file="Tests - 2016.03.23 at 07h 17m 40s.xml">
<configuration name="Tests" configurationId="PHPUnitRunConfigurationType" />
</history-entry>
<history-entry file="Tests - 2016.03.23 at 14h 31m 26s.xml">
<configuration name="Tests" configurationId="PHPUnitRunConfigurationType" />
</history-entry>
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="9013000" />
<option name="totallyTimeSpent" value="10861000" />
</component>
<component name="TodoView">
<todo-panel id="selected-file">
@ -827,22 +893,22 @@
</todo-panel>
</component>
<component name="ToolWindowManager">
<frame x="-2" y="-26" width="1444" height="899" extended-state="6" />
<frame x="0" y="0" width="1440" height="871" extended-state="6" />
<editor active="false" />
<layout>
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.17083333" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32793018" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32793018" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="12" side_tool="true" content_ui="tabs" />
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32917705" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32917705" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.25561097" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" x="0" y="355" width="1446" height="188" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25561097" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" x="0" y="355" width="1446" height="188" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24964234" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32294264" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32793018" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="PHP-CGI Server" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
@ -938,26 +1004,10 @@
<watches-manager />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/src/Coffee/Table.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="69" column="5" selection-start-line="69" selection-start-column="5" selection-end-line="69" selection-end-column="5" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/../coffeetable_/src/CoffeeTable/Spot.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Coffee/Position.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="55" column="42" selection-start-line="55" selection-start-column="42" selection-end-line="55" selection-end-column="42" />
<folding />
</state>
</provider>
</entry>
@ -980,7 +1030,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="55" column="42" selection-start-line="55" selection-start-column="42" selection-end-line="55" selection-end-column="42" />
<folding />
</state>
</provider>
</entry>
@ -996,7 +1045,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="113" column="62" selection-start-line="113" selection-start-column="62" selection-end-line="113" selection-end-column="62" />
<folding />
</state>
</provider>
</entry>
@ -1228,7 +1276,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2988">
<caret line="166" column="38" selection-start-line="166" selection-start-column="38" selection-end-line="166" selection-end-column="38" />
<folding />
</state>
</provider>
</entry>
@ -1239,33 +1286,17 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tests/Coffee/TableTest.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="161">
<caret line="96" column="22" selection-start-line="96" selection-start-column="22" selection-end-line="96" selection-end-column="22" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tests/Coffee/SpotTest.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="295">
<state relative-caret-position="504">
<caret line="28" column="15" selection-start-line="28" selection-start-column="15" selection-end-line="28" selection-end-column="15" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Coffee/Tile.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="666">
<caret line="38" column="16" selection-start-line="38" selection-start-column="16" selection-end-line="38" selection-end-column="16" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Coffee/Spot.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="181">
<state relative-caret-position="450">
<caret line="30" column="19" selection-start-line="30" selection-start-column="19" selection-end-line="30" selection-end-column="19" />
<folding />
</state>
@ -1275,13 +1306,12 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/index.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="334">
<state relative-caret-position="1224">
<caret line="68" column="17" selection-start-line="68" selection-start-column="17" selection-end-line="68" selection-end-column="17" />
<folding />
</state>
@ -1295,18 +1325,50 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Coffee/Tile.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="288">
<caret line="38" column="25" selection-start-line="38" selection-start-column="25" selection-end-line="38" selection-end-column="25" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Coffee/Table.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="323">
<caret line="81" column="23" selection-start-line="81" selection-start-column="23" selection-end-line="81" selection-end-column="23" />
<state relative-caret-position="316">
<caret line="111" column="33" selection-start-line="111" selection-start-column="33" selection-end-line="111" selection-end-column="33" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tests/Coffee/TileTest.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="370">
<caret line="26" column="5" selection-start-line="26" selection-start-column="5" selection-end-line="26" selection-end-column="5" />
<state relative-caret-position="108">
<caret line="6" column="0" selection-start-line="4" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tests/Coffee/QueueTest.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="234">
<caret line="13" column="26" selection-start-line="13" selection-start-column="26" selection-end-line="13" selection-end-column="26" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tests/Coffee/TableTest.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1728">
<caret line="96" column="22" selection-start-line="96" selection-start-column="22" selection-end-line="96" selection-end-column="22" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Coffee/Queue.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
<caret line="5" column="14" selection-start-line="5" selection-start-column="14" selection-end-line="5" selection-end-column="14" />
<folding />
</state>
</provider>

@ -0,0 +1,30 @@
<?php
namespace Coffee;
/**
* Class Queue
*
* @package Coffee
*/
class Queue {
/**
* @var array
*/
private $queue = [];
/**
* @param $element
*/
public function push($element) {
$this->queue[] = $element;
}
/**
* @return mixed
*/
public function pop() {
return array_shift($this->queue);
}
}

@ -0,0 +1,18 @@
<?php
namespace Coffee;
// This is not necessary, since it is bootstrapped but serves for debugging purposes
require __DIR__ . '/../../vendor/autoload.php';
class QueueTest extends \PHPUnit_Framework_TestCase {
public function testPushPop() {
$queue = new Queue();
$queue->push('1');
$queue->push('2');
$queue->push('3');
$this->assertEquals('1', $queue->pop());
}
}
Loading…
Cancel
Save