Commit:    5446b7cea1dfc25435f0152ba2afd678a72b9485
Author:    Matt Ficken <v-maf...@.redmond.corp.microsoft.com>         Mon, 24 
Oct 2011 18:13:45 -0700
Parents:   90500eab112133f325137286e76af9c9121511f7
Branches:  master

Link:       
http://git.php.net/?p=pftt2.git;a=commitdiff;h=5446b7cea1dfc25435f0152ba2afd678a72b9485

Log:
support for additional PHPT sections

Changed paths:
  A  PFTT/config/git_conf.cmd
  A  PFTT/lib/scenario/set.rb


Diff:
diff --git a/PFTT/config/git_conf.cmd b/PFTT/config/git_conf.cmd
new file mode 100644
index 0000000..9f19952
--- /dev/null
+++ b/PFTT/config/git_conf.cmd
@@ -0,0 +1,6 @@
+REM configure git
+
+git config --global user.name "Matt Ficken"
+
+git config --global user.email v-maf...@microsoft.com
+
diff --git a/PFTT/lib/scenario/set.rb b/PFTT/lib/scenario/set.rb
new file mode 100644
index 0000000..e7aefd7
--- /dev/null
+++ b/PFTT/lib/scenario/set.rb
@@ -0,0 +1,61 @@
+
+module Scenario
+  class Set
+    
+    include TestBenchFactor
+    
+    attr_accessor :working_fs, :remote_fs, :date, :database
+    attr_reader :id
+    
+    def initialize(id, working_filesystem_scenario)
+      @id = id
+    end
+    
+    def execute_script_start
+      values.each do |ctx|
+        ctx.execute_script_start(env, test, script_type, deployed_script, 
self.php_binary, @php_build, current_ini, @host, 
(@host.posix?)?(:posix):(:windows) )
+      end
+    end
+          
+    def execute_script_stop
+      values.map do |ctx|
+        ctx.execute_script_stop(test, script_type, deployed_script, 
self.php_binary, @php_build, @host)
+      end
+    end
+          
+    def ini(platform, ini=nil)
+      if platform != :windows and platform != :posix
+        raise ArgumentError, 'platform must be :windows or :posix'
+      end
+      
+      values.each do |scn|
+        scn.execute_script_start(env, test, :test, deployed_script, 
self.php_binary, @php_build, @current_ini, @host, platform)
+      end
+    end
+    
+    def values
+      list = [@working_fs]
+      if @remote_fs
+        list << @remote_fs
+      end
+      if @date
+        list << @date
+      end
+      if @database
+        list << @database
+      end
+      return list  
+    end
+    
+    def teardown(host)
+      values.each do |scn|
+        scn.teardown(host)
+      end
+    end
+    
+    def == (o)
+      o.instance_of?(Scenario::Set) and o.id == @id 
+    end
+    
+  end
+end


--
PHP Quality Assurance Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to