Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
asalae-core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Libriciel
archivage
asalae-core
Commits
08c0572f
Commit
08c0572f
authored
1 year ago
by
Ludovic Ganée
Browse files
Options
Downloads
Patches
Plain Diff
qualité du code
parent
74b81067
No related branches found
No related tags found
No related merge requests found
Pipeline
#59638
failed
1 year ago
Stage: stack
Changes
4
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
composer.json
+1
-0
1 addition, 0 deletions
composer.json
composer.lock
+214
-207
214 additions, 207 deletions
composer.lock
src/MinkSuite/MinkCase.php
+10
-7
10 additions, 7 deletions
src/MinkSuite/MinkCase.php
src/Utility/Exec.php
+1
-1
1 addition, 1 deletion
src/Utility/Exec.php
with
226 additions
and
215 deletions
composer.json
+
1
−
0
View file @
08c0572f
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
"ext-mbstring"
:
"*"
,
"ext-mbstring"
:
"*"
,
"ext-openssl"
:
"*"
,
"ext-openssl"
:
"*"
,
"ext-pdo"
:
"*"
,
"ext-pdo"
:
"*"
,
"ext-posix"
:
"*"
,
"ext-soap"
:
"*"
,
"ext-soap"
:
"*"
,
"ext-sockets"
:
"*"
,
"ext-sockets"
:
"*"
,
"ext-xml"
:
"*"
,
"ext-xml"
:
"*"
,
...
...
This diff is collapsed.
Click to expand it.
composer.lock
+
214
−
207
View file @
08c0572f
This diff is collapsed.
Click to expand it.
src/MinkSuite/MinkCase.php
+
10
−
7
View file @
08c0572f
...
@@ -161,7 +161,7 @@ class MinkCase implements MinkCaseInterface, SetupMinkInterface
...
@@ -161,7 +161,7 @@ class MinkCase implements MinkCaseInterface, SetupMinkInterface
/**
/**
* Fait un screenshot
* Fait un screenshot
* @param string $path
* @param string
|null
$path
* @return void
* @return void
* @throws Exception
* @throws Exception
*/
*/
...
@@ -169,7 +169,7 @@ class MinkCase implements MinkCaseInterface, SetupMinkInterface
...
@@ -169,7 +169,7 @@ class MinkCase implements MinkCaseInterface, SetupMinkInterface
{
{
$path
=
$path
?:
self
::
getScreenshotPath
();
$path
=
$path
?:
self
::
getScreenshotPath
();
if
(
!
is_dir
(
dirname
(
$path
)))
{
if
(
!
is_dir
(
dirname
(
$path
)))
{
mkdir
(
dirname
(
$path
),
0777
);
mkdir
(
dirname
(
$path
),
0777
,
true
);
}
}
$this
->
driver
->
captureScreenshot
(
$path
);
$this
->
driver
->
captureScreenshot
(
$path
);
if
(
!
env
(
'LINES'
))
{
if
(
!
env
(
'LINES'
))
{
...
@@ -180,7 +180,8 @@ class MinkCase implements MinkCaseInterface, SetupMinkInterface
...
@@ -180,7 +180,8 @@ class MinkCase implements MinkCaseInterface, SetupMinkInterface
/**
/**
* Fait un screenshot et l'envoi sur un serveur
* Fait un screenshot et l'envoi sur un serveur
* @param string $path
* @param string|null $path
* @param string $url
* @return void
* @return void
* @throws Exception
* @throws Exception
*/
*/
...
@@ -191,7 +192,7 @@ class MinkCase implements MinkCaseInterface, SetupMinkInterface
...
@@ -191,7 +192,7 @@ class MinkCase implements MinkCaseInterface, SetupMinkInterface
$path
=
$path
?:
self
::
getScreenshotPath
();
$path
=
$path
?:
self
::
getScreenshotPath
();
$this
->
screenshot
(
$path
);
$this
->
screenshot
(
$path
);
$response
=
$this
->
upload
(
$path
);
$response
=
$this
->
upload
(
$path
,
$url
);
$status
=
$response
->
getStatusCode
();
$status
=
$response
->
getStatusCode
();
$response
=
$response
->
getStringBody
();
$response
=
$response
->
getStringBody
();
if
(
$status
===
200
)
{
if
(
$status
===
200
)
{
...
@@ -203,7 +204,7 @@ class MinkCase implements MinkCaseInterface, SetupMinkInterface
...
@@ -203,7 +204,7 @@ class MinkCase implements MinkCaseInterface, SetupMinkInterface
/**
/**
* Sauvegarde le html dans un fichier
* Sauvegarde le html dans un fichier
* @param string $path
* @param string
|null
$path
* @return void
* @return void
*/
*/
public
function
exportHtml
(
string
$path
=
null
):
void
public
function
exportHtml
(
string
$path
=
null
):
void
...
@@ -219,7 +220,8 @@ class MinkCase implements MinkCaseInterface, SetupMinkInterface
...
@@ -219,7 +220,8 @@ class MinkCase implements MinkCaseInterface, SetupMinkInterface
/**
/**
* Upload le html
* Upload le html
* @param string $path
* @param string|null $path
* @param string $url
* @return void
* @return void
*/
*/
public
function
htmlUpload
(
public
function
htmlUpload
(
...
@@ -229,7 +231,7 @@ class MinkCase implements MinkCaseInterface, SetupMinkInterface
...
@@ -229,7 +231,7 @@ class MinkCase implements MinkCaseInterface, SetupMinkInterface
$path
=
$path
?:
(
basename
(
self
::
getScreenshotPath
(),
'.png'
)
.
'.html'
);
$path
=
$path
?:
(
basename
(
self
::
getScreenshotPath
(),
'.png'
)
.
'.html'
);
$this
->
exportHtml
(
$path
);
$this
->
exportHtml
(
$path
);
$response
=
$this
->
upload
(
$path
);
$response
=
$this
->
upload
(
$path
,
$url
);
$status
=
$response
->
getStatusCode
();
$status
=
$response
->
getStatusCode
();
$response
=
$response
->
getStringBody
();
$response
=
$response
->
getStringBody
();
if
(
$status
===
200
)
{
if
(
$status
===
200
)
{
...
@@ -805,6 +807,7 @@ js
...
@@ -805,6 +807,7 @@ js
break
;
break
;
}
}
}
}
/** @noinspection PhpUndefinedMethodInspection */
$classLoader
=
$autoloaderClassName
::
getLoader
();
$classLoader
=
$autoloaderClassName
::
getLoader
();
self
::
$classes
=
$classLoader
->
getClassMap
();
self
::
$classes
=
$classLoader
->
getClassMap
();
}
}
...
...
This diff is collapsed.
Click to expand it.
src/Utility/Exec.php
+
1
−
1
View file @
08c0572f
...
@@ -139,7 +139,7 @@ class Exec
...
@@ -139,7 +139,7 @@ class Exec
*/
*/
public
static
function
procIsRunning
(
int
$pid
):
bool
public
static
function
procIsRunning
(
int
$pid
):
bool
{
{
if
(
posix_kill
(
$pid
,
0
)
!==
false
)
{
if
(
posix_kill
(
$pid
,
0
)
!==
false
)
{
if
(
!
in_array
(
$pid
,
self
::
getZombieList
()))
{
if
(
!
in_array
(
$pid
,
self
::
getZombieList
()))
{
posix_kill
(
$pid
,
9
);
posix_kill
(
$pid
,
9
);
return
false
;
return
false
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment