Exemple #1
0
        public void RunPhpVH()
        {
            TestDirectory = new DirectoryInfo(Path.Combine(WebRoot, Name + "Test"));

            if (TestDirectory.Exists)
            {
                TestDirectory.Delete(true);
            }

            TestDirectory.Create();
            GetTestReports().Iter(x => x.Delete(true));

            Php
            .Concat(new [] { "Php\\FalsePositiveCheck.php" })
            .Iter(x => File.Copy(x, Path.Combine(TestDirectory.FullName, Path.GetFileName(x))));

            if (LaunchInAppDomain)
            {
                var domain = AppDomain.CreateDomain("testDomain");
                domain.ExecuteAssembly("phpvh.exe", CreateArgs2());
                AppDomain.Unload(domain);
            }
            else
            {
                LaunchProcess();
            }
        }
Exemple #2
0
        public void RunPhpVH()
        {
            if (!Directory.Exists(Settings.Webroot))
            {
                throw new DirectoryNotFoundException(string.Format("Directory {0} not found.", Settings.Webroot));
            }

            TestDirectory = new DirectoryInfo(Path.Combine(Settings.Webroot, Name + "Test"));

            if (TestDirectory.Exists)
            {
                TestDirectory.Delete(true);
            }

            TestDirectory.Create();

            GetTestReports().Iter(x => x.Delete(true));

            Php
            .Concat(new[] { "Php\\FalsePositiveCheck.php" })
            .Iter(x => File.Copy(x, Path.Combine(TestDirectory.FullName, Path.GetFileName(x))));

            if (Settings.LaunchInAppDomain)
            {
                var domain = AppDomain.CreateDomain("testDomain");
                domain.ExecuteAssembly("phpvh.exe", CreateArgs2());
                AppDomain.Unload(domain);
            }
            else
            {
                LaunchProcess();
            }
        }