[Argil-svn] SF.net SVN: argil: [526] branches/experimental
Status: Alpha
Brought to you by:
tswicegood
|
From: <tsw...@us...> - 2007-05-25 00:44:01
|
Revision: 526
http://argil.svn.sourceforge.net/argil/?rev=526&view=rev
Author: tswicegood
Date: 2007-05-24 17:44:02 -0700 (Thu, 24 May 2007)
Log Message:
-----------
Add in the start of some annontation parsing
Added Paths:
-----------
branches/experimental/src/Argil/Util/
branches/experimental/src/Argil/Util/Annotation/
branches/experimental/src/Argil/Util/Annotation/Collection.php
branches/experimental/src/Argil/Util/Annotation/Value.php
branches/experimental/tests/Argil/Util/
branches/experimental/tests/Argil/Util/Annotation/
branches/experimental/tests/Argil/Util/Annotation/CollectionTest.php
Added: branches/experimental/src/Argil/Util/Annotation/Collection.php
===================================================================
--- branches/experimental/src/Argil/Util/Annotation/Collection.php (rev 0)
+++ branches/experimental/src/Argil/Util/Annotation/Collection.php 2007-05-25 00:44:02 UTC (rev 526)
@@ -0,0 +1,16 @@
+<?php
+
+class Argil_Util_Annotation_Collection
+{
+ private $_stack = array();
+
+ public function add(Argil_Util_Annotation_Value $annontation)
+ {
+ $this->_stack[] = $annotation;
+ }
+
+ public function count()
+ {
+ return count($this->_stack);
+ }
+}
\ No newline at end of file
Added: branches/experimental/src/Argil/Util/Annotation/Value.php
===================================================================
--- branches/experimental/src/Argil/Util/Annotation/Value.php (rev 0)
+++ branches/experimental/src/Argil/Util/Annotation/Value.php 2007-05-25 00:44:02 UTC (rev 526)
@@ -0,0 +1,6 @@
+<?php
+
+class Argil_Util_Annotation_Value
+{
+
+}
\ No newline at end of file
Added: branches/experimental/tests/Argil/Util/Annotation/CollectionTest.php
===================================================================
--- branches/experimental/tests/Argil/Util/Annotation/CollectionTest.php (rev 0)
+++ branches/experimental/tests/Argil/Util/Annotation/CollectionTest.php 2007-05-25 00:44:02 UTC (rev 526)
@@ -0,0 +1,15 @@
+<?php
+
+require_once dirname(__FILE__) . '/../../../config.php';
+require_once 'Argil/Util/Annotation/Collection.php';
+
+class Argil_Util_Annotation_CollectionTest extends UnitTestCase
+{
+ public function testCanBeAddedTo()
+ {
+ $collection = new Argil_Util_Annotation_Collection();
+ $this->assertEqual(0, $collection->count());
+ $collection->add(new MockArgil_Util_Annotation_Value());
+ $this->assertEqual(1, $collection->count());
+ }
+}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|